This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from flask import Flask, send_file, jsonify | |
| # This line creates a Flask webserver object, it states that | |
| # the static_url_path should be empty, meaning that all of our | |
| # files in our current directory are served directly from ./ | |
| # which includes index.html, script.js, style.css and server.py. | |
| app = Flask(__name__, static_url_path='', static_folder='./') | |
| # This handles our tic-tac-toe application, it means when someone | |
| # goes to the root path of our application as defined by `/` it | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import pip | |
| if __name__ == "__main__": | |
| pip.main(["install", "flask"]) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import random | |
| from tkinter import * | |
| from tkinter import ttk | |
| random_number = random.randint(1, 100) | |
| maximum_guesses = 10 | |
| current_guesses = 0 | |
| # Create the root window object in Python which we will be binding our GUI objects to. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import requests | |
| r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass')) | |
| print(r.status_code) | |
| print(r.headers) | |
| print(r.text) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | document.addEventListener("DOMContentLoaded", () => { | |
| var board = [ | |
| document.getElementById("col1"), | |
| document.getElementById("col2"), | |
| document.getElementById("col3"), | |
| document.getElementById("col4"), | |
| document.getElementById("col5"), | |
| document.getElementById("col6"), | |
| document.getElementById("col7"), | |
| document.getElementById("col8"), | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | div.container { | |
| display: grid; | |
| grid-template-areas: | |
| "col1 col2 col3" | |
| "col4 col5 col6" | |
| "col7 col8 col9" | |
| "button button button"; | |
| grid-template-columns: 150px 150px 150px; | |
| grid-template-rows: 150px 150px 150px; | |
| gap: 10px; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!doctype html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="style.css" /> | |
| <script type="text/javascript" src="script.js"></script> | |
| </head> | |
| <body> | |
| <h1>Tic tac toe</h1> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="dice.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <div style="border: 5px solid blue"> | |
| <img id="current_die" src="blank.png" alt="blank" /> | |
| </div> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const dice = new Array(6); | |
| dice[0] = "die1.png"; | |
| dice[1] = "die2.png"; | |
| dice[2] = "die3.png"; | |
| dice[3] = "die4.png"; | |
| dice[4] = "die5.png"; | |
| dice[5] = "die6.png"; | |
| function rollRandomDie() { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="lesson3.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <form action="#"> | |
| <label>Temperature in celsius</label> | |
| <input type="text" id="celsius" name="celsius" /> | 
NewerOlder