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, render_template | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def home(): | |
| return render_template('index.html') | |
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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| <link href="https://fonts.googleapis.com/css2?family=Raleway" rel="stylesheet"> | |
| <link rel="stylesheet" href="../static/css/styles.css"> | |
| </head> | |
| <body> | |
| <div class="wrapper"> |
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 sheety | |
| print("Welcome to Angela's Flight Club.\n \ | |
| We find the best flight deals and email them to you.") | |
| first_name = input("What is your first name? ").title() | |
| last_name = input("What is your last name? ").title() | |
| email1 = "email1" | |
| email2 = "email2" |
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
| sp = spotipy.Spotify( | |
| auth_manager=SpotifyOAuth( | |
| scope="playlist-modify-private", | |
| redirect_uri="http://example.com", | |
| client_id=YOUR UNIQUE CLIENT ID, | |
| client_secret= YOUR UNIQUE CLIENT SECRET, | |
| show_dialog=True, | |
| cache_path="token.txt" | |
| ) | |
| ) |
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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| </head> | |
| <body> | |
| <form> | |
| <label>Name</label> | |
| <input type="text" placeholder="name"> |
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
| #No Authentication | |
| sheet_response = requests.post(sheet_endpoint, json=sheet_inputs) | |
| #Basic Authentication | |
| sheet_response = requests.post( | |
| sheet_endpoint, | |
| json=sheet_inputs, | |
| auth=( | |
| YOUR USERNAME, | |
| YOUR PASSWORD, |
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
| //Don't change this | |
| var aYear = Int(readLine()!)! | |
| func isLeap(year: Int) { | |
| var leap = "NO" | |
| //IF divisible by 4 with no remainders. | |
| if year % 4 == 0 { | |
| leap = "YES" |
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
| let alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] | |
| //The number of letters in alphabet equals 26 | |
| var password = alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] | |
| print(password) |
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
| class FlightData: | |
| def __init__(self, price, origin_city, origin_airport, destination_city, destination_airport, out_date, return_date): | |
| self.price = price | |
| self.origin_city = origin_city | |
| self.origin_airport = origin_airport | |
| self.destination_city = destination_city | |
| self.destination_airport = destination_airport | |
| self.out_date = out_date | |
| self.return_date = return_date |
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
| //Don't change this | |
| var studentsAndScores = ["Amy": Int(readLine()!)!, "James": Int(readLine()!)!, "Helen": Int(readLine()!)!] | |
| func highestScore(scores: [String: Int]) { | |
| //Write your code here. | |
| let a = studentsAndScores["Amy"]! | |
| let b = studentsAndScores["James"]! | |
| let c = studentsAndScores["Helen"]! |
NewerOlder