Advertisement
TTpocToXaKep

Dice Game [1 dice]

Jan 31st, 2023
915
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. # https://pastebin.com/u/TTpocToXaKep
  2. num_guessed = int(input('Guess the number from 1 to 6: '))
  3.  
  4. import random
  5.  
  6. num_rolled = random.randint(1, 6)
  7.  
  8. if num_guessed == num_rolled:
  9.     print('You guessed it! It was', num_rolled)
  10. else:
  11.     print('Wrong guess. The number was', num_rolled)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement