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 turtle | |
| import pandas | |
| screen = turtle.Screen() | |
| screen.title("U.S.A States game") | |
| image = "blank_states_img.gif" | |
| screen.addshape(image) | |
| turtle.shape(image) |
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 time | |
| from turtle import Screen | |
| from player import Player | |
| from car_manager import CarManager | |
| from scoreboard import Scoreboard | |
| screen = Screen() | |
| screen.setup(width=600, height=600) | |
| screen.tracer(0) |
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 turtle import Screen | |
| from paddle import Paddle | |
| from ball import Ball | |
| import time | |
| from scoreboard import ScoreBoard | |
| # Step 1 - Create the screen | |
| screen = Screen() |
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 snake import Snake | |
| import time | |
| from turtle import Screen | |
| from food import Food | |
| from scoreboard import ScoreBoard | |
| screen = Screen() | |
| screen.setup(width=600, height=600) | |
| screen.bgcolor("black") | |
| screen.title("Snake Game") |
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 question_model import Question | |
| from data import question_data | |
| from quiz_brain import QuizBrain | |
| question_bank = [] | |
| for question in question_data: | |
| question_text = question["text"] | |
| question_answer = question["answer"] | |
| new_question = Question(q_text=question_text, q_answer=question_answer) | |
| question_bank.append(new_question) |
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
| MENU = { | |
| "espresso": { | |
| "ingredients": { | |
| "water": 50, | |
| "coffee": 18, | |
| }, | |
| "cost": 1.5, | |
| }, | |
| "latte": { | |
| "ingredients": { |
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
| # step 1 - import logos and random | |
| import random | |
| logo = """ | |
| __ ___ __ | |
| / / / (_)___ _/ /_ ___ _____ | |
| / /_/ / / __ `/ __ \/ _ \/ ___/ | |
| / __ / / /_/ / / / / __/ / | |
| /_/ ///_/\__, /_/ /_/\___/_/ |
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
| logo = "welcome to number guessing game" | |
| print(logo) | |
| import random | |
| computer_choice = random.randint(1, 101) | |
| # print(f"psst! computer's number is {computer_choice}") to test code | |
| # Include an ASCII art logo. |
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 | |
| logo = """ | |
| .------. _ _ _ _ _ | |
| |A_ _ |. | | | | | | (_) | | | |
| |( \/ ).-----. | |__ | | __ _ ___| | ___ __ _ ___| | __ | |
| | \ /|K /\ | | '_ \| |/ _` |/ __| |/ / |/ _` |/ __| |/ / | |
| | \/ | / \ | | |_) | | (_| | (__| <| | (_| | (__| < | |
| `-----| \ / | |_.__/|_|\__,_|\___|_|\_\ |\__,_|\___|_|\_\\ |
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
| # calculator | |
| # ADD | |
| def add(n1, n2): | |
| return n1 + n2 | |
| # subtracting | |
| def subtract(n1, n2): | |
| return n1 - n2 |