Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 20 Online
OpenStudy (anonymous):

How to use count in problem set 1, 1st problem (1000th prime number)??

OpenStudy (anonymous):

usually you will initialize the variable at the beginning of your code (count = 0) and then first thing inside of your while or for loop you will add (count = count + 1) or as a shortcut you can do (count += 1). This will take count and add 1 to its current value each time through the loop.

OpenStudy (anonymous):

Thanx :)

OpenStudy (anonymous):

you're very welcome

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!