This file contains 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 tkinter | |
import winsound | |
import time | |
import math | |
def countdown(count): | |
seconds=math.floor(count%60) |
This file contains 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 | |
passWords=["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","@","#","%","^","&","*","1","2","3","4","5","6","7","8","9"] | |
n=int(input("How long do you want your password to be?")) | |
def passwordGenerator(): | |
randomPassword=random.randint(0,40) | |
return passWords[randomPassword] | |
l=''.join([passwordGenerator() for i in range(n)]) | |
print(l) | |
This file contains 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 | |
guessesTaken=0 | |
myname=input("Hello! What is your name?") | |
number=random.randint(1,20) #The number that the user needs to guess | |
print('Well, ' +myname+ ', I am thinking of a number between 1 and 20. You have 5 tries to guess the number. Good luck! :)') | |
while guessesTaken<6: |