nutrition - if z=="b":...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
print"Carl's Jr. Nutritional Information Quiz" print"\n\nHow many grams of fat does the Teriyaki Six Dollar Burger have?" print"a) 33" print"b) 43" print"c) 53" x=raw_input("Answer:") if x=="b": print "Correct!" elif x is "B": print"Correct!" else: print"Wrong!" print"\nThe Jalapeno Burger contains how many grams of protein?" print"a) 27" print"b) 37" print"c) 47" y=raw_input("Answer:") if y is "a": print "Correct!" elif y is "A": print"Correct!" else: print "Wrong!" print"\nHow many charbroiled beef patties does the Big Carl have?" print"a) 1" print"b) 2" print"c) 3" z=raw_input("Answer:")
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if z=="b": print"Correct!" elif z is "B": print "Correct!" else: print"Wrong!" if z is "b": a=1 elif z is "B": a=1 else: a=0 if y is "a": b=1 elif y is "A": b=1 else: b=0 if x is "b": c=1 elif x is "B": c=1 else: c=0 score=a+b+c if score is 1: print "\nYou got", a+b+c,"question correct." if score is not 1: print "\nYou got a",a+b+c,"questions correct." if score is 3: print"Great job!" if score is 2: print"Not too shabby." if score is 1: print"You should study a little more." if score is 0: print"Is there ANYTHING you know?."...
View Full Document

This note was uploaded on 02/21/2010 for the course ECS 40175 taught by Professor Amenta during the Fall '09 term at UC Davis.

Page1 / 2

nutrition - if z=="b":...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online