Question to Database
This quiz will save your answers and put it in a database that will be able to be printed. Please put your information and you will get candy this is not clickbait.
from tokenize import Ignore
questions = [
"What is your favorite type of dog? (Please use capitals and accurate spelling - ex. Huskey) "]
answer = input
print (questions)
guess = (input())
print (guess)
print("Thank you for answering the question! Your response will be saved in a database for me to look over!")
name = (guess)
print("dog", name, type(name))
print()
InfoDb = []
InfoDb.append({
"Favorite Dog": (guess)})
print (InfoDb)
def print_data(d_rec):
print(d_rec["Favorite Dog"])
def for_loop(): #only if there are more than one answer
print("For loop output\n")
for record in InfoDb:
print_data(record)
for_loop()