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

see how many Gustav bought a piece of fabric of a yard long. He cut 6 8 1 4 fabric does Gustav have? the fabric into pieces yd long. How many pieces of Gustav c
Solve the question below
Neolin unified indigenous people with the doctrines of:
Can someone plz help me? :( A. He considers rich people more important than poor people. B. He has little interest in protecting other countries. C. He does no
The endpoints of a segment are (10,3) and (20,17). How do you know it is a diagonal segment?
In his book on the arts, Charles Batteux distinguished the fine arts from a. seditious arts. b. practical arts. c. folk arts. d. popular arts.
A test of H0: p = 0.4 versus Ha: p > 0.4 has the test statistic z = 2.52. Part A: What conclusion can you draw at the 5% significance level? At the 1% signif
90 to 48 rounded to the nearest percent
Can someone please do missing values?
GIVING OUT BRAINLIEST Explain how these characteristics of inner and outer planets are verified observations and not just the opinions of scientists.