Jupyter Notebook Quiz
San Diego Padres Quiz
import getpass, sys
questions = 7
correct = 0
def question_and_answer(prompt, answer):
print("Question: " + prompt)
msg = input()
print("Answer: " + msg)
if answer == msg:
print("Correct Answer")
global correct
correct+=1
else:
print ("Incorrect Answer")
question_and_answer("Fill in the blank ____ Musgrove", "Joe")
question_and_answer("Who is the starting first baseman for the Padres?", "Josh Bell")
question_and_answer("Who is the Manager for the Padres?", "Bob Melvin")
question_and_answer("Who is the starting third baseman for the Padres", "Manny Machado")
question_and_answer("What is the General Manager for the Padres?", "A.J. Preller")
question_and_answer("Who is the starting right fielder", "Juan Soto")
question_and_answer("What city are the Padres based in?", "San Diego")
print(correct, "Answers correct")
import random
num1 = random.randrange(1, 20)
print(num1)