emikey emikey
  • 20-10-2017
  • Computers and Technology
contestada

I am having trouble figuring out how to write a while loop in Python. Can someone help me?

Respuesta :

zrh2sfo
zrh2sfo zrh2sfo
  • 20-10-2017
#!/usr/bin/python
 
count = 0
while (count < 9):
    print 'The count is:', count
   count = count + 1

print "Goodbye!"

The output should look like this:
The count is: 0
The count is: 1
The count is: 2
The count is: 3
The count is: 4
The count is: 5
The count is: 6
The count is: 7
The count is: 8
Goodbye!


Answer Link

Otras preguntas

benedict solution with apple pulp​
Summarize how the gambling/gaming industry has been regulated historically. Consider both state laws, federal laws, and tribal laws.
If the world price for a good exceeds the before-trade domestic price for a good, then that country must have.
Generally, as children grow taller, they also weigh more. This implies a _______ correlation between height and weight for children.
How much faster does ²³⁵UF₆ effuse than ²³⁸UF₆?
Who is legally responsible for knowing what the state requirements are to maintain credentials for a health care career?.
Thaddeus wants to attend a sports camp this spring that costs $180.00 for the week. He rakes leaves during the fall and earns $58.35. He shovels snow during the
Hi! how do I do this and Draw this?
Why did Henry VIII create his own church?
What is one important distinction between the four-part processing model for word recognition and the three-cueing systems model?.