1-Guess The Number. Write a programme
2 where the computer randomly generates
3 a number between 0 and 20
4-Rock, Paper, Scissors Game
5-Tic Tac Toe
6-Password Generator
7-Hangman
8-Binary Search Algorithm
1#Password generator
2
3import random
4import string
5
6letters = string.ascii_letters
7print('Your brand new password is:')
8print (''.join(random.choice(letters) for i in range(12)))
9
1##-Guess The Number. Write a programme
2## where the computer randomly generates
3##a number between 0 and 20
4
5from random import randint
6
7print("Hey there! In this game, you will have to guess a random number from 1, 20. Good luck!")
8user_name = input("What's your name?\n")
9
10print(user_name,"pick a number!")
11guess = input()
12
13random_int = randint(0, 20)
14
15if guess != random_int:
16 print('That was wrong!', random_int, "was the number!")
17else:
18 print('That was correct!')
19
20