Help needed
Hey everyone, it's me. Again. And, as usual, I am an idiot and can't figure out how to write this code. Help me please?
Okay so I'm writing this code where the user will input the amount of numbers they'd be inputting plus all the numbers, and the code will add all the numbers. The amount of numbers can vary. So, I wrote this:
N = int(input())
for i in range(N):
y = (i ** 3)
total = sum(y)
print(total)
This, however, will not work. Can someone please look at this?? Thank you.
This works for me:
N = int(input("Amount of numbers: "))
total = 0
for i in range(N):
numb = int(input("Number "+str(i+1)+": "))
total += numb
print(total)
Tell me if it helps.
@Brandaboss Thank you
I think you should send HappyFakeboulde the multiplayer link ; copy the code down first if he accidentally erases it.
@TopZek or if i purposefully erase it
can you please give a link to the repl instead of pasting in the code?
@HappyFakeboulde Sure thing. https://repl.it/student/submissions/4786500