Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. #333
  2. a = int(input())
  3. b = int(input())
  4. x = a
  5. s = ''
  6. while x <= b:
  7.     if x % 2 == 0:
  8.         s = s + str(x) + ' '
  9.     x += 1
  10. print(s)
  11.  
  12. #315
  13. x = int(input())
  14. y = 1
  15. s = 0
  16. while y <= x:
  17.     s = s + y ** 2
  18.     y += 1
  19. print(s)
  20.  
  21. #3059
  22. n = int(input())
  23. x = 1
  24. while x <= n:
  25.     print(x)
  26.     x = x * 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement