if.py 561 B

1234567891011121314151617181920
  1. number = 23
  2. guess = int(input('Enter an integer : '))
  3. if guess == number:
  4. # New block starts here
  5. print('Congratulations, you guessed it.')
  6. print('(but you do not win any prizes!)')
  7. # New block ends here
  8. elif guess < number:
  9. # Another block
  10. print('No, it is a little higher than that')
  11. # You can do whatever you want in a block ...
  12. else:
  13. print('No, it is a little lower than that')
  14. # you must have guessed > number to reach here
  15. print('Done')
  16. # This last statement is always executed,
  17. # after the if statement is executed.