Advertisement
Brusnik

Untitled

Jul 1st, 2025
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. # Задание №1
  2.  
  3. x = int(input())
  4. while (x % 2 != 0) and (x%10 != 5):
  5.     x = int(input())
  6.  
  7.  
  8. # Задание №2
  9.  
  10. for i in range(10):
  11.     print(i)
  12.  
  13.  
  14. # Задание №3
  15.  
  16. K = int(input())
  17. N = int(input())
  18. i = K
  19. summ = 0
  20.  
  21. while(i <= N):
  22.     if i % 2 == 1:
  23.         summ += i
  24.     i += 1
  25.  
  26. print(summ)
  27.  
  28.  
  29. # Задание №4
  30.  
  31. N = int(input())
  32. i = N
  33. fact = 1
  34.  
  35. while(i):
  36.     fact *= i
  37.     i -= 1
  38.  
  39. print(fact)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement