
Sign up to save your podcasts
Or


Welcome to Coding 101 - It's the TWiT show that gives YOU the knowledge to live in the wonderful world of the programmer. This week we are introducing our newest module, Python with Code Warrior Dale Chase!
To see all the code used in today's episode, go to Our Github Repository for Module 2
Loops (Recap)For Loops
For Loops use a "range" function to determine the start and the end of the loop.
Code Sample:
for counter in range(0,3):
- print counter
if/else statements
Code Sample:
a = raw_input("Please enter a whole number:")
b = raw_input("Please enter a second whole number:")
if a < b:
print "a is less than b"
Code Sample:
a = raw_input("Please enter a whole number:")
b = raw_input("Please enter a second whole number:")
if a < b:
- print "a is less than b"
elif a == b:
- print "a is equal to b"
else:
- print "b is less than a"
The Modulo (Mod) Operator
Sample Problem
Sample Code:
var1 = raw_input("Please enter a whole number:")
leftover = int(var1) % 2
if leftover == 0:
- print var1, "is an even number"
else:
- print var1, "is an odd number"
Hosts: Fr. Robert Ballecer, SJ and Shannon Morse
Guest: Dale Chase
Bandwidth for Coding 101 is provided by CacheFly.
Sponsor:
By TWiT4
44 ratings
Welcome to Coding 101 - It's the TWiT show that gives YOU the knowledge to live in the wonderful world of the programmer. This week we are introducing our newest module, Python with Code Warrior Dale Chase!
To see all the code used in today's episode, go to Our Github Repository for Module 2
Loops (Recap)For Loops
For Loops use a "range" function to determine the start and the end of the loop.
Code Sample:
for counter in range(0,3):
- print counter
if/else statements
Code Sample:
a = raw_input("Please enter a whole number:")
b = raw_input("Please enter a second whole number:")
if a < b:
print "a is less than b"
Code Sample:
a = raw_input("Please enter a whole number:")
b = raw_input("Please enter a second whole number:")
if a < b:
- print "a is less than b"
elif a == b:
- print "a is equal to b"
else:
- print "b is less than a"
The Modulo (Mod) Operator
Sample Problem
Sample Code:
var1 = raw_input("Please enter a whole number:")
leftover = int(var1) % 2
if leftover == 0:
- print var1, "is an even number"
else:
- print var1, "is an odd number"
Hosts: Fr. Robert Ballecer, SJ and Shannon Morse
Guest: Dale Chase
Bandwidth for Coding 101 is provided by CacheFly.
Sponsor:

202 Listeners

78 Listeners

355 Listeners

8 Listeners

3 Listeners

7 Listeners

3 Listeners