Convert a for loop to a while loop

From CompSciWiki
Revision as of 22:59, 3 April 2012 by MaryAnnN (Talk | contribs)

Jump to: navigation, search

COMP 1010 Home > Back to Extra Labs

Introduction

In this program, you will be learn how to use while and for loop control structures in Python.

while and for loops syntax in Python:

while (expression):

  Statement(s)

for iterating_var in sequence:

  statements(s)

Step 1:

 Bla3;