0
Hello Guys,I need a code to append int values in a list, untill we enter the nagetive value.
The length of list will gonna increase, once we enter a negative value to insert into the list, the appending need to be stopped
7 Antworten
+ 4
while num >=0:
That should get you started.
Follow the prompts from Lisa & review your lessons
+ 3
Please show your own attempt.
Hint:
* create an empty list
* use a while loop
* get input inside of loop
* convert input to integer
* if integer is small than 0, break; else append to list
+ 2
while True
# input
# conversion
# break or append
+ 1
while n>=0:
#append to list
#decrement
0
Could you please tell me, what is the condition I need to take at while loop, >>> while ? : At "?" What I need to write
0
Thanks alot 🥳🥳🥳
0
Sure 🥳