Advertisement
dino3vr

Untitled

Oct 31st, 2019
2,379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | None | 0 0
  1.  
  2. # 1
  3. a = int(input("Введите число: "))
  4. while a > 0: a = a + int(input("Введите число: "))
  5. input("Нажмите Enter для продолжения")
  6.  
  7. # 2
  8. a = int(input("Введите число: "))
  9. while a < 0: a = a + int(input("Введите число: "))
  10. input("Нажмите Enter для продолжения")
  11.  
  12. # 3
  13. a = int(input("Введите число: "))
  14. while a != 0: a = a + int(input("Введите число: "))
  15. input("Нажмите Enter для продолжения")
  16.  
  17. # 4
  18. a = int(input("Введите число: "))
  19. while True:
  20.     if a % 2: break
  21.     else: a = a + int(input("Введите число: "))
  22. input("Нажмите Enter для продолжения")
  23.  
  24. # 5
  25. n = int(input("Введите N: "))
  26. i = 0
  27. while True:
  28.     if i * i <= n: print(i, end=" ")
  29.     else: break
  30.     i += 1
  31. input("\nНажмите Enter для продолжения")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement