Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
needing help on :goto
#4
You can also use a loop function.

While
Code:
x = 1
y = 4
while x*x != y:
       x +=1

This one will keep adding 1 to x, until x*x = 4.


For

Code:
a = [1,2,3,4,5,6,7,8,9]
for x in a:
    print x

This will assign every value in a to x and print x.
Reply


Messages In This Thread
needing help on :goto - by Mr.FeellingLeSS - 10-17-2009, 02:43 PM
RE: needing help on :goto - by g4143 - 10-17-2009, 03:48 PM
RE: needing help on :goto - by nevets04 - 10-17-2009, 05:04 PM
RE: needing help on :goto - by L0iz - 10-18-2009, 03:19 AM
RE: needing help on :goto - by Mr.FeellingLeSS - 10-18-2009, 06:09 AM
RE: needing help on :goto - by Akshay* - 10-19-2009, 05:26 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)