nutrition

# nutrition - if z==&amp;amp;quot;b&amp;amp;quot;:...

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

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:")

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if z==&quot;b&quot;: print&quot;Correct!&quot; elif z is &quot;B&quot;: print &quot;Correct!&quot; else: print&quot;Wrong!&quot; if z is &quot;b&quot;: a=1 elif z is &quot;B&quot;: a=1 else: a=0 if y is &quot;a&quot;: b=1 elif y is &quot;A&quot;: b=1 else: b=0 if x is &quot;b&quot;: c=1 elif x is &quot;B&quot;: c=1 else: c=0 score=a+b+c if score is 1: print &quot;\nYou got&quot;, a+b+c,&quot;question correct.&quot; if score is not 1: print &quot;\nYou got a&quot;,a+b+c,&quot;questions correct.&quot; if score is 3: print&quot;Great job!&quot; if score is 2: print&quot;Not too shabby.&quot; if score is 1: print&quot;You should study a little more.&quot; if score is 0: print&quot;Is there ANYTHING you know?.&quot;...
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==&amp;amp;quot;b&amp;amp;quot;:...

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

View Full Document
Ask a homework question - tutors are online