Created
September 29, 2020 13:15
-
-
Save Frontear/13e7361eb48671b80f66fdb355e055fb to your computer and use it in GitHub Desktop.
This is the code for CPS109 Lab 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nums = [] | |
while True: | |
x = float(input("Please enter a number: ")) | |
nums.append(x) | |
if x < 0.0: | |
break | |
for x in range(len(nums)): | |
print(str(nums[x]), end="") | |
if x != len(nums) - 1: | |
print(" + ", end="") | |
print(" = " + str(sum(nums))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment