Random numbers 0 of 10 activities solved
  1. The randint function Not yet read
  2. The choice function Not yet read
  3. The randrange function Not yet read
  4. Predict and run Not yet read
  5. Investigate Not yet read
  6. Modify Not yet solved
  7. Modify with repeated guesses Not yet solved
  8. Modify with playing cards Not yet solved
  9. Make Not yet solved
  10. Make with close guesses Not yet solved
Next series String manipulation
Random numbers

Modify with repeated guesses

Sign in to hand in your solution and get feedback.

secret_number = 7 print("Hello, what's your name?") player_name = input() print("Okay " + player_name + ", guess a number between 1 and 10:") guess = int(input()) if guess < secret_number: print("Your guess is too low") elif guess > secret_number: print("Your guess is too high") else: print("Congratulations! You guessed correctly.")