Coding in Python - STEM

lucky = 8. print "Is 13 my lucky number?", 13 == lucky. print "Is 8 my lucky number?", 8 == lucky Take care to use one = sign when remembering the number and two == signs when checking it. Python can also think of random numbers. This is a little bit trickier to type. import random. random.randint(1, 6) This is like rolling a die. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download