Guess my number
Guess my number
Guess my number
Making a complete game with the following example:
import random
print 'guess a number'
a = raw_input()
b = random.randint(1,100)
print 'Is it ', b, '?'
if a == b:
print 'Yes! Correct!'
else:
print 'Sorry'
- You may need "for loop" and new variables.
- Can you make a program which is able to guess your number?
1. Make a guessing game where the player guesses the number generated by the computer
2. Make a guessing game where the computer guesses the number you think