Advertisement
Gowwa

Untitled

Jul 14th, 2019
1,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. # 1
  3. x = int(input('Введите шестизначное число '))
  4. y = 0
  5. for i in range(1, 7):
  6.     y += x % 10
  7.     x = x // 10
  8. print(y)
  9.  
  10. # 4
  11. d = 179
  12. for y in range(1543):
  13.     d += 2007
  14. print(d)
  15.  
  16. # 2
  17. f = int(input("Введите число "))
  18. g = 0
  19. t = 1
  20. for i in range(f):
  21.     g += t
  22.     t += 2
  23. print(g)
  24.  
  25. # 3
  26. e = int(input())
  27. v = 0
  28. for i in range(9):
  29.     h = int(input())
  30.     if e * h < 0:
  31.         v += 1
  32.     e = h
  33. print(v)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement