ctheimer2

ctheimer2 - print"b a Chinese cabbage"...

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

View Full Document Right Arrow Icon
# Quiz program # print "Chinese Food Quiz" print "\nChow mein is" print "a) a noodle dish" print "b) a rice dish" print "c) a dessert made with mein" a1 = raw_input("Answer:") if a1 == "a": print "Correct" elif a1 == "b": print "Incorrect" elif a1 == "c": print "Incorrect" else: print "Invalid input" a1 = raw_input("Answer:") print "\nThousand year old eggs are" print "a) really old eggs" print "b) a type of tofu" print "c) a preserved egg made with ash vinegar" a2 = raw_input("Answer:") if a2 == "c": print "Correct" elif a2 == "a": print "Incorrect" elif a2 == "b": print "Incorrect" else: print "Invalid input" a2 = raw_input ("Answer:") print "\nBok Choy is" print "a) a shellfish"
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: print "b) a Chinese cabbage" print "c) a pork dish" a3 = raw_input ("Answer:") if a3 == "b": print "Correct" elif a3 == "a": print "Incorrect" elif a3 == "c": print "Incorrect" else: print "Invalid input" a3 = raw_input ("Answer:") if a1 == "a": a1 = 1 else: a1 = 0 if a2 == "c": a2 = 1 else: a2 = 0 if a3 == "b": a3 = 1 else: a3 = 0 print "\nYour score is", a1 + a2 + a3 score = a1+a2+a3 if score == 3: print "Perfect score." if score == 2: print "Close but not quite." if score == 1: print "Better luck next time." if score == 0: print "You need to get out more." raw_input("\nPress enter to exit.")...
View Full Document

This note was uploaded on 10/13/2009 for the course ECS 10 taught by Professor Amenta during the Spring '07 term at UC Davis.

Page1 / 2

ctheimer2 - print"b a Chinese cabbage"...

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