Skip to content

Instantly share code, notes, and snippets.

View Chaitran77's full-sized avatar
💭
Hopefully building something new. Go to repositories > electronicsClub

Kiran Patel Chaitran77

💭
Hopefully building something new. Go to repositories > electronicsClub
View GitHub Profile
@Chaitran77
Chaitran77 / __replit_main__
Created August 31, 2018 08:33
Kiran's Interactive Times Tables created by chaitran77 - https://repl.it/@chaitran77/Kirans-Interactive-Times-Tables
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
@Chaitran77
Chaitran77 / __replit_main__
Created August 31, 2018 08:33
Kiran's Interactive Times Tables created by chaitran77 - https://repl.it/@chaitran77/Kirans-Interactive-Times-Tables
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
@Chaitran77
Chaitran77 / main.py
Created November 28, 2017 07:39
HangMan created by chaitran77 - https://repl.it/@chaitran77/HangMan
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
@Chaitran77
Chaitran77 / Guess the number game.py
Created July 27, 2017 08:23
Guess the number game created by chaitran77 - https://repl.it/I6bK/315
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 = []
@Chaitran77
Chaitran77 / Guess the number game.py
Created July 26, 2017 14:33
Guess the number game created by chaitran77 - https://repl.it/I6bK/308
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 = []
@Chaitran77
Chaitran77 / Eylp-70.py
Created January 21, 2017 08:57 — forked from anonymous/Eylp-70.py
null created by chaitran77 - https://repl.it/Eylp/70
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