Advertisement
mrScarlett

subroutine quiz

Oct 16th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. def greeting():
  2.     name=""
  3.     print ("Welcome to the BLAH BLAH QUIZ.")
  4.     while (len(name)==0):
  5.         name=input("Enter name")
  6.     print("Hi",name,"Let's begin!")
  7.     questions()
  8.        
  9. def questions():
  10.     score=0
  11.     question1=input("What is the capital of Germany?")
  12.     if question1 == "Berlin":
  13.         print ("correct")
  14.         score+=1
  15.     else:
  16.         print ("Incorrect")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement