Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Sep 24th, 2018 55 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. while chance > 0:
  2.     guess = raw_input("What goes in ___%s___: " % str(index+1))
  3.     if checkanswer(answer, guess):
  4.         print "Correct! n"
  5.         print '-' * 20
  6.         quiz = quiz.replace('___%s___' % str(index+1), guess)
  7.         print quiz
  8.         print '-' * 20 + 'n'
  9.         break
  10.     elif chance > 1:
  11.         print "That is incorrect. Try again."
  12.         chance += -1
  13.         print chance, "chance(s) left. n"
  14.     else:
  15.         alive = False
  16.         break
  17. return quiz
  18.    
  19. print 'n' + "* " * 10
  20. print "Welcome to the quiz.n"
  21. setdifficulty()
  22. quiz = quizes[difficulty]
  23. setchances()
  24.  
  25. print "Let's get started:"
  26. print "=" * 20
  27. print quiz
  28. print "=" * 20 + 'n'
  29.  
  30. for index in xrange(len(answers[difficulty])):
  31.     quiz = answerquestion(index, quiz)
  32.     if not alive: break
  33.  
  34. if alive:
  35.     print "Great job completing the %s quiz!n" % difficulty
  36. else:
  37.     print "Too many wrong guesses. Game over.n"
  38.  
  39. return alive
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top