0
I need someone to explain how to use a while loop for this
#replace the comment in the following code with a while loop . numxs=int(input("How many times should i print the number X? ")) toPrint=' ' #concatecate X to toPrint numxs times. print(toPrint)
4 Antworten
+ 2
I posted the code below, it works 👍👍
https://code.sololearn.com/c5t8NV67lf3Q/?ref=app
+ 1
Thanks it does
0
# something like this?
stop=0
numxs=int(input())
toPrint="test"
while numxs != stop:
print(toPrint)
stop+=1
0
This created an infinite loop