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!")
['What is your favorite type of dog? (Please use capitals and accurate spelling - ex. Huskey) ']
German Shepard
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()
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb Cell 3 in <cell line: 1>()
----> <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W2sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0'>1</a> name = (guess)
      <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W2sdnNjb2RlLXJlbW90ZQ%3D%3D?line=1'>2</a> print("dog", name, type(name))
      <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W2sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3'>4</a> print()

NameError: name 'guess' is not defined
InfoDb = []

InfoDb.append({
    "Favorite Dog": (guess)})

print (InfoDb)
[{'Favorite Dog': 'German Shepard'}]
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()
For loop output

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb Cell 5 in <cell line: 9>()
      <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W4sdnNjb2RlLXJlbW90ZQ%3D%3D?line=5'>6</a>     for record in InfoDb:
      <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W4sdnNjb2RlLXJlbW90ZQ%3D%3D?line=6'>7</a>         print_data(record)
----> <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W4sdnNjb2RlLXJlbW90ZQ%3D%3D?line=8'>9</a> for_loop()

/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb Cell 5 in for_loop()
      <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W4sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3'>4</a> def for_loop(): #only if there are more than one answer
      <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W4sdnNjb2RlLXJlbW90ZQ%3D%3D?line=4'>5</a>     print("For loop output\n")
----> <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W4sdnNjb2RlLXJlbW90ZQ%3D%3D?line=5'>6</a>     for record in InfoDb:
      <a href='vscode-notebook-cell://wsl%2Bubuntu/root/vscode/que-pro/_notebooks/2022-08-30-Please-Give-Me-Your-Info.ipynb#W4sdnNjb2RlLXJlbW90ZQ%3D%3D?line=6'>7</a>         print_data(record)

NameError: name 'InfoDb' is not defined