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 | |
import time | |
PROMPT = "--->" | |
ALLOWED_TABLES = (1, 12) | |
question = () # first element = first multiple, second element | |
answer = None | |
no_of_questions = 10 # or infinate unitl one wrong | |
no_correct_answers = 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
import random | |
import time | |
PROMPT = "--->" | |
ALLOWED_TABLES = (1, 12) | |
question = () # first element = first multiple, second element | |
answer = None | |
no_of_questions = 10 # or infinate unitl one wrong | |
no_correct_answers = 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
import random | |
import pygame | |
from pygame.locals import * | |
pygame.init() | |
words = "inhabitant resign excitement introduce reserve cattle feminine flavor sleeve incapable athlete investigation rabbit access recognize vigorous freshman ceiling coyote baboon wombat aposemetic miracle linear unlike border plastic rebellion remark settlement voucher intention heaven dentist recognize intervention sleeve champion mushroom development".split() | |
wrong_attempts = 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
import time | |
import random | |
import datetime | |
# number = random.randint(0,100) <-- this is commented out because it will only generate a random number 1'ce | |
# every time loop() is run, number needs to be redifined. Better to define in loop(). Can't globalise number. | |
prompt = ">>>" | |
gu_num = 0 | |
round = 1 # this is fine because built-in round will not be used | |
counter = 10 | |
highscores = [] |
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 | |
import datetime | |
number = random.randint(0,100) | |
prompt = ">>>" | |
gu_num = 0 | |
round = 1 # this is fine because built-in round will not be used | |
counter = 10 | |
highscores = [] |
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 datetime import datetime | |
def close(): | |
input("\n\nPress the enter key to exit.") | |
ages = {"age1": 0} | |
currentyear = datetime.now().year | |
currentmonth = datetime.now().month | |
currentday = datetime.now().day |