Friday, April 13, 2007

CSE 110 - LAB 5

ans=["B","D","A","A","C","A","B","A","C","D","B","C","D","A","5","C","C","B","D","A"]
user=[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]
ques=0
correct=0
wrong=0
#print ans[4]
while ques<16:
user[ques] = raw_input("What is the answer for question # ") ## CANT FIGURE OUT HOW TO DISPLAY NUMBER
if user[ques]==ans[ques]:
correct=correct+1
else:
wrong=wrong+1
ques=ques+1
print
if correct > 15:
print "Yes you have passed the test. YAY!"
else:
print "Sorry, you have failed the test! HAR HAR YOU LOOSE!"
print
print "Number Correct " , correct
print "Number Wrong ", wrong

No comments: