import random

foods = [
    {"name": "Pizza", "description": "A baked dish made of dough, tomato sauce, and toppings such as cheese and meat."},
    {"name": "Sushi", "description": "A Japanese dish consisting of small balls or rolls of vinegar-flavored cold cooked rice served with a garnish of vegetables, egg, or raw seafood."},
    {"name": "Burger", "description": "A sandwich consisting of a grilled beef patty served on a bun, often with cheese, lettuce, tomato, and other toppings."},
    {"name": "Taco", "description": "A traditional Mexican dish consisting of a corn or wheat tortilla filled with meat, beans, cheese, and vegetables."},
    {"name": "Pad Thai", "description": "A stir-fried noodle dish commonly served as a street food and in casual restaurants in Thailand."},
    {"name": "Fish and Chips", "description": "A British dish consisting of battered fish and deep-fried chips (French fries)."}
]

points = 0

for i in range(len(foods)):
    food = random.choice(foods)
    print("What food item is described as follows?")
    print(food["description"])
    guess = input("Guess the name of the food item: ")
    if guess.lower() == food["name"].lower():
        print("Correct! You earned 10 points.")
        points += 10
    else:
        print("Incorrect. The correct answer is", food["name"], ". You lost 5 points.")
        points -= 5
    foods.remove(food)
    
print("Game over. Your final score is", points)
What food item is described as follows?
A British dish consisting of battered fish and deep-fried chips (French fries).
Correct! You earned 10 points.
What food item is described as follows?
A stir-fried noodle dish commonly served as a street food and in casual restaurants in Thailand.
Incorrect. The correct answer is Pad Thai . You lost 5 points.
What food item is described as follows?
A baked dish made of dough, tomato sauce, and toppings such as cheese and meat.
Incorrect. The correct answer is Pizza . You lost 5 points.
What food item is described as follows?
A sandwich consisting of a grilled beef patty served on a bun, often with cheese, lettuce, tomato, and other toppings.
Correct! You earned 10 points.
What food item is described as follows?
A traditional Mexican dish consisting of a corn or wheat tortilla filled with meat, beans, cheese, and vegetables.
Incorrect. The correct answer is Taco . You lost 5 points.
What food item is described as follows?
A Japanese dish consisting of small balls or rolls of vinegar-flavored cold cooked rice served with a garnish of vegetables, egg, or raw seafood.
Correct! You earned 10 points.
Game over. Your final score is 15

Another Version of the Food game

This version Makes it so that you have 2 options to choose from and this was the next section that I wanted to complete and improve. Next version has only one round instead of asking multiple times.

import random

foods = [    {"name": "Pizza", "description": "A baked dish made of dough, tomato sauce, and toppings such as cheese and meat."},   
             {"name": "Sushi", "description": "A Japanese dish consisting of small balls or rolls of vinegar-flavored cold cooked rice served with a garnish of vegetables, egg, or raw seafood."},    
             {"name": "Burger", "description": "A sandwich consisting of a grilled beef patty served on a bun, often with cheese, lettuce, tomato, and other toppings."},    
             {"name": "Taco", "description": "A traditional Mexican dish consisting of a corn or wheat tortilla filled with meat, beans, cheese, and vegetables."},   
             {"name": "Pad Thai", "description": "A stir-fried noodle dish commonly served as a street food and in casual restaurants in Thailand."},    {"name": "Fish and Chips", "description": "A British dish consisting of battered fish and deep-fried chips (French fries)."}]

points = 0
rounds = 5

for i in range(rounds):
    # Select two random foods from the list
    food1, food2 = random.sample(foods, 2)
    print("Which of the following foods is described as follows?")
    print("1. " + food1["description"])
    print("2. " + food2["description"])
    guess = int(input("Enter 1 or 2 to guess: "))
    if guess == 1 and food1["name"].lower() == input("Guess the name of the first food item: ").lower():
        print("Correct! You earned 10 points.")
        points += 10
    elif guess == 2 and food2["name"].lower() == input("Guess the name of the second food item: ").lower():
        print("Correct! You earned 10 points.")
        points += 10
    else:
        print("Incorrect. The correct answer is", food1["name"] + " or " + food2["name"], ". You lost 5 points.")
        points -= 5
    
print("Game over. Your final score is", points)

Getting the Answer correct

This is the version when you get the answer correct

import random

foods = [
    {"name": "Pizza", "description": "A baked dish made of dough, tomato sauce, and toppings such as cheese and meat."},
    {"name": "Sushi", "description": "A Japanese dish consisting of small balls or rolls of vinegar-flavored cold cooked rice served with a garnish of vegetables, egg, or raw seafood."},
    {"name": "Burger", "description": "A sandwich consisting of a grilled beef patty served on a bun, often with cheese, lettuce, tomato, and other toppings."},
    {"name": "Taco", "description": "A traditional Mexican dish consisting of a corn or wheat tortilla filled with meat, beans, cheese, and vegetables."},
    {"name": "Pad Thai", "description": "A stir-fried noodle dish commonly served as a street food and in casual restaurants in Thailand."},
    {"name": "Fish and Chips", "description": "A British dish consisting of battered fish and deep-fried chips (French fries)."}
]

# Select two random foods from the list
food1, food2 = random.sample(foods, 2)

print("Which of the following foods is described as follows?")
print("1. " + food1["description"])
print("2. " + food2["description"])
guess = int(input("Enter 1 or 2 to guess: "))
if guess == 1 and food1["name"].lower() == input("Guess the name of the first food item: ").lower():
    print("Correct! You guessed the food item correctly.")
elif guess == 2 and food2["name"].lower() == input("Guess the name of the second food item: ").lower():
    print("Correct! You guessed the food item correctly.")
else:
    print("Incorrect. The correct answer for Question 1 is", food1["name"] + " and the answer for the Question 2 is" + food2["name"])
    
print("Thanks For Playing the Game.")
Which of the following foods is described as follows?
1. A baked dish made of dough, tomato sauce, and toppings such as cheese and meat.
2. A British dish consisting of battered fish and deep-fried chips (French fries).
Correct! You guessed the food item correctly.
Thanks For Playing the Game.

Getting the Answer Wrong

This is the Final version of the game

import random

foods = [
    {"name": "Pizza", "description": "A baked dish made of dough, tomato sauce, and toppings such as cheese and meat."},
    {"name": "Sushi", "description": "A Japanese dish consisting of small balls or rolls of vinegar-flavored cold cooked rice served with a garnish of vegetables, egg, or raw seafood."},
    {"name": "Burger", "description": "A sandwich consisting of a grilled beef patty served on a bun, often with cheese, lettuce, tomato, and other toppings."},
    {"name": "Taco", "description": "A traditional Mexican dish consisting of a corn or wheat tortilla filled with meat, beans, cheese, and vegetables."},
    {"name": "Pad Thai", "description": "A stir-fried noodle dish commonly served as a street food and in casual restaurants in Thailand."},
    {"name": "Fish and Chips", "description": "A British dish consisting of battered fish and deep-fried chips (French fries)."}
]

# Select two random foods from the list
food1, food2 = random.sample(foods, 2)

print("Which of the following foods is described as follows?")
print("1. " + food1["description"])
print("2. " + food2["description"])
guess = int(input("Enter 1 or 2 to guess: "))
if guess == 1 and food1["name"].lower() == input("Guess the name of the first food item: ").lower():
    print("Correct! You guessed the food item correctly.")
elif guess == 2 and food2["name"].lower() == input("Guess the name of the second food item: ").lower():
    print("Correct! You guessed the food item correctly.")
else:
    print("Incorrect. The correct answer for Question 1 is", food1["name"] + " and the answer for the Question 2 is" + food2["name"])
    
print("Thanks For Playing the Game.")
Which of the following foods is described as follows?
1. A traditional Mexican dish consisting of a corn or wheat tortilla filled with meat, beans, cheese, and vegetables.
2. A Japanese dish consisting of small balls or rolls of vinegar-flavored cold cooked rice served with a garnish of vegetables, egg, or raw seafood.
Incorrect. The correct answer for Question 1 is Taco and the answer for the Question 2 isSushi
Thanks For Playing the Game.