Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- num_computer = random.randint(1,10)
- print(num_computer)
- name = input('What is your name? \n')
- print('Hi', name,',', 'I am thinking about a number between 1 and 10')
- num_player = int(input('Tell me my number\n'))
- while num_computer != num_player:
- print('Wrong, try again!')
- num_player = input('Tell me my number again\n')
- if num_computer == num_player:
- print('Congratulations, that was my number!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement