This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how replace the comment in the following code with a while loop in python. Comment: concatenate X to toPrint numXs times
numXs = int(input('How many times should I print the letter X? '))
toPrint = ''
if numXs == 1:
elif numXs == 2:
    toPrint = 'XX'
elif numXs == 3:
    toPrint = 'XXX'
print(toPrint)
python

Hello vahid.atabaigi!

We believe that this post does not fit the main topic of this site.

Not bioinformatics-related. Consider asking this on StackExchange after searching on google.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

0 answers

No answers yet.

Log in to answer this question.