Advertisement
kooken12

Untitled

Feb 22nd, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. invoer1 = int(input())
  2. invoer2 = int(input())
  3. spatie = " "
  4. print(f"{spatie}{invoer1} {invoer2}")
  5. while invoer1 != -1 and invoer2 != -1:
  6. tijdelijk = []
  7. for x in list(str(invoer1)):
  8. tijdelijk.append(x)
  9. for x in list(str(invoer2)):
  10. tijdelijk.append(x)
  11. som = 0
  12. for x in tijdelijk:
  13. som += int(x)
  14. invoer1 = som
  15. reserve = invoer2
  16. invoer2 = int(input())
  17. spatie += " "
  18. if invoer2 == -1:
  19. print(f"{spatie}{invoer1}")
  20.  
  21. else:
  22. print(spatie+str(invoer1).center(4)+str(invoer2).center(4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement