Guest User

Untitled

a guest
Dec 10th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. def main():
  2. list = []
  3. numbers = str(input("What is your next number for the list? Type done to stop: "))
  4. i = 0
  5. j = 0
  6. totalSum = 0
  7. while numbers != "done":
  8. list.append(int(numbers))
  9. numbers = input("What is your next number for the list? Type done to stop: ")
  10. while i < len(list):
  11. totalSum = totalSum + list[i]
  12. i = i + 1
  13. print(totalSum)
  14. print(list)
  15. while j < len(list):
  16. k = j + 1
  17. while k < len(list):
  18. if list[j] * list[k] > totalSum:
  19. print("(" + str(list[j]) + "," + str(list[k]) + ")")
  20. k = k + 1
  21. j = j + 1
  22. main()
Add Comment
Please, Sign In to add comment