Lets read the following code carefully for a variety of inputs
// First program to read
x=raw_input("Enter a number:") # Remember this returns a string
x=int(x) # Turn the string x into an integer x.
print 'Zero ',
print 'Ten ',
if x > 20:
print 'Twenty ',
income=raw_input('What is your annual income?')
years=raw_input('How many years have you worked at your current job?'
years = int(years)
if income>=min_income or years > min_years:
print 'You qualify for a loan.'
print 'You must earn at least',min_income
print 'or have been employed'
print 'for more than',min_years,'years'
print 'to qualify for a loan.'
// select different values of x, y and z and then determine what prints by inspection
// only. You can check later by running the program. Try to find different
// values of x,y and z that ends up running every instruction below.
x=raw_input('Enter the value (int) for x:')
x = int(x)
y=raw_input('Enter the value (int) for y:')
y = int(y)
z=raw_input('Enter the value (int) for z:')
z = int(z)
print 'x is larger than y'
m = x+m
m = 2*m
print 'x is less than or equal to y'
m = y + m
m = 3*m
print 'm is',m
print 'Both positive'
print 'x is positive'
print 'y is positive'
print 'both negitive'