Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. # Integer23:
  2. N = 5674
  3. print('С начала последнего часа прошло ', N%3600//60, 'полных минут.')
  4.  
  5. #Условный оператор
  6. # Операторы сравнения: <, <=, >, >=, ==, !=
  7.  
  8. x = int(input('Enter number: '))
  9.  
  10. # 78
  11. print(x//10, ',', x%10)
  12. print('Сумма цифр =', x//10 + x % 10)
  13.  
  14. if x > 0:
  15. print('Number is positive!')
  16. print('===================')
  17. elif x == 0:
  18. print('Number is zero!')
  19. else:
  20. print('Number is negative!')
  21. print('******************')
  22.  
  23. #Полная версия:
  24. if x > 0:
  25. print('Number is positive!')
  26. print('===================')
  27. else:
  28. if x == 0:
  29. print('Number is zero!')
  30. else:
  31. print('Number is negative!')
  32. print('******************')
  33.  
  34. print('End of programm')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement