<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Overview
Hour 1
Data Types
Decision Structures
Hour 2
git demo
py.test demo
Hour 3
Graded lab exercise
Data Types
Recall that variables are like containers with labels
These containers also have "type." The type of a container determines the shape of stuff that can go inside.
Many data types in Python. Only need to know about
Step1:  How does Python know the data type?
Strings are delimited by quotation marks
Floats have decimals
Ints don't have decimals
Step2:  Reassigning Variables
Variables can change values after initial assignment
Step3:  Variables can also change types after initial assignment
Step4:  Value can also be forced to take on a data type
int() converts a value to an integer
float() converts a value to a float
str() converts a value to a string
But it doesn't always make sense to so
Step5:  Ranges of Data Types
It is possible to have numbers that are too big or too small to be represented by Python.
Integers range from -2**63 to 2**63 - 1
Floats range from 2.2250738585072014e-308 to 1.7976931348623157e+308
Step6:  Decision Structures
So far, we've been writing programs that do the same thing repeatedly. If order for a program to be more reactive, we need a way for it to make decisions. Depending on whether something is the case, it takes one action or another. 
Here's the general form of an if statement
if *condition*
Step7:  Boolean Expressions and Relational Operators
Step8:  Comparing Strings
Characters are stored as ASCII codes
Uppercase A-Z are numbers 65-90
Lowercase a-z are 97-122
Digits 0-9 are 48-57
String comparisons use these codes
Step9:  Putting Together Concepts
Let's put the if statement together with Boolean expressions
Step10:  Alternate Paths
Step11:  Nested Decision Structure
Step12:  Multiple Nested Decision Structures
<ASSISTANT_TASK:>
Python Code:
arthur = "king"
lancelot = -23
robin = 1.99
bedevere = True
Explanation: Overview
Hour 1
Data Types
Decision Structures
Hour 2
git demo
py.test demo
Hour 3
Graded lab exercise
Data Types
Recall that variables are like containers with labels
These containers also have "type." The type of a container determines the shape of stuff that can go inside.
Many data types in Python. Only need to know about: string, integer, float, and Boolean
Integer
Positive or negative whole numbers
Float
Short for floating point number
Positive or negative number with values to the right of the decimal place
Booleans
Named after the mathematician George Boole.
Booleans can be True or False. (The capitalization is important.)
End of explanation
arthur = "king"
type(arthur)
lancelot = -23
type(lancelot)
robin = 1.99
type(robin)
bedevere = True
type(bedevere)
Explanation: How does Python know the data type?
Strings are delimited by quotation marks
Floats have decimals
Ints don't have decimals
End of explanation
galahad = 1
galahad = 57
galahad
Explanation: Reassigning Variables
Variables can change values after initial assignment
End of explanation
patsy = 2
patsy = "Clip clop"
type(patsy)
Explanation: Variables can also change types after initial assignment
End of explanation
zoot = float(5)
zoot = 5.0
zoot
type(zoot)
zoot = "5"
type(zoot)
zoot = str(5)
zoot
type(zoot)
arthur = "king"
galahad = "5"
print(arthur + galahad)
robin = 4
bedevere = 5.0
print(robin * bedevere)
int(20.7)
Explanation: Value can also be forced to take on a data type
int() converts a value to an integer
float() converts a value to a float
str() converts a value to a string
But it doesn't always make sense to so
End of explanation
import sys
print(sys.maxint)
print(sys.float_info)
Explanation: Ranges of Data Types
It is possible to have numbers that are too big or too small to be represented by Python.
Integers range from -2**63 to 2**63 - 1
Floats range from 2.2250738585072014e-308 to 1.7976931348623157e+308
End of explanation
cold = True
if cold:
    print("Wear a coat.")
Explanation: Decision Structures
So far, we've been writing programs that do the same thing repeatedly. If order for a program to be more reactive, we need a way for it to make decisions. Depending on whether something is the case, it takes one action or another. 
Here's the general form of an if statement
if *condition*:
    statement
    statement
    etc.
End of explanation
x = 1
y = 2
y != x
Explanation: Boolean Expressions and Relational Operators
End of explanation
name1 = "Mary1"
name2 = "Mary"
name1 < name2
Explanation: Comparing Strings
Characters are stored as ASCII codes
Uppercase A-Z are numbers 65-90
Lowercase a-z are 97-122
Digits 0-9 are 48-57
String comparisons use these codes
End of explanation
temperature = 10
if (temperature < 12):
    print("Wear a coat.")
Explanation: Putting Together Concepts
Let's put the if statement together with Boolean expressions
End of explanation
temperature = 39.5
if temperature < 40.0:
    print("A little cold, isn't it?")
    print("Wear a coat")
else:
    print("Nice weather we're having")
    print("Don't wear a coat")
print("Done the if-statement")
Explanation: Alternate Paths
End of explanation
salary = 40000
years_on_the_job = 2
if salary >= 30000:
    if years_on_the_job >= 2:
        print("You qualify for the loan")
    else:
        print("You must have been on your current job for at least two years to qualify.")
else:
    print("You must earn at least $30,000 per year to qualify.")
Explanation: Nested Decision Structure
End of explanation
score = 45
if score >= 90:
    print("Your grade is A")
elif score >= 80:
    print("Your grade is B")
elif score >= 70:
    print("Your grade is C")
else:
    print ("Restart. Try again.")
print("Done with if-statement")
Explanation: Multiple Nested Decision Structures
End of explanation
<END_TASK>