Question: Food Truck Menu Overview Create a program that will format a food truck menu Objectives gain familiarity with f - string formatting understand format specifications

Food Truck Menu
Overview
Create a program that will format a food truck menu
Objectives
gain familiarity with f-string formatting
understand format specifications for different types of data
understand alignment and fill characters
Description
This program will print out a menu for a food truck. The menu may change from day to day, so the current menu items and prices are input by the user. The name of the truck is also input so the program can be used by multiple businesses.
The name of the food truck, and the entire menu should be printed in fields 30 spaces wide.
The program should ask the user for the following, in order:
name of the food truck; prompt: "Enter the name of the Food Truck:
"
menu item 1; prompt: "Enter the first menu item name:
"
price of menu item 1 ; prompt: "Enter the price of the first menu item:
"
menu item 2 ; prompt: "Enter the second menu item name:
"
price of menu item 2 ; prompt: "Enter the price of the second menu item:
"
menu item 3; prompt: "Enter the third menu item name:
"
price of menu item 3; prompt: "Enter the price of the third menu item:
"
The specific prompts are shown below in the example. Each prompt should end with a new line.
Then, your program should print the days menu as follows:
Line 1: The name of the food truck, centered in a field 30 spaces wide.
Line 2: 30 underscores
Line 3: Menu item 1, left justified, price of menu item 1, right justified, with periods between (see example below)
Line 4: Menu item 2 and price in the same way as Menu item 1
Line 5: Menu item 3 and price in the same way as Menu item 1.
Line 6: 30 underscores.
Ex: If the input is:
Enter the name of the Food Truck:
Monday's StreetFood
Enter the first menu item name:
Tacos de Carne Asada
Enter the price of the first menu item:
10
Enter the second menu item name:
Fajitas
Enter the price of the second menu item:
10
Enter the third menu item name:
Vegan Bowl
Enter the price of the third menu item:
9
the output is:
Monday's StreetFood
______________________________
Tacos de Carne Asada.....10.00
Fajitas..................10.00
Vegan Bowl................9.00
______________________________
Remember that the price should come in as a float, and should be displayed with 2 decimal places (dollars and cents), even if the user only input the price in dollars.
Hint: Make the menu lines a field of length 20 for the menu item and a field of length 10 for the price with fill character of a period.
Note: Make sure you have watched the lecture video on advanced formatting in the Formatting Strings section.
LAST RUN on 3/14/2024,8:47:53 AM
Check 1 failed
Enter the name of the Food Truck:
Enter the first menu item name:
Enter the price of the first menu item:
Enter the second menu item name:
Enter the price of the second menu item:
Enter the third menu item name:
Enter the price of the third menu item:
Veg-N
______________________________
Coney Carrot Dog..........7.00
BBQ-Hunny Black B-N......10.50
Cheezy Chick-N............7.99
______________________________
Check 2 failed
Enter the name of the Food Truck:
Enter the first menu item name:
Enter the price of the first menu item:
Enter the second menu item name:
Enter the price of the second menu item:
Enter the third menu item name:
Enter the price of the third menu item:
Monday's StreetFood
______________________________
Tacos de Carne Asada.....10.00
Fajitas..................10.00
Vegan Bowl................9.00
______________________________
Check 3 failed
Enter the name of the Food Truck:
Enter the first menu item name:
Enter the price of the first menu item:
Enter the second menu item name:
Enter the price of the second menu item:
Enter the third menu item name:
Enter the price of the third menu item:
Shove it Pizza Truck
______________________________
Spinach Garlic Feta.......8.00
The Meathead.............11.00
Strawberry Nutella.......11.75
______________________________
Check 4 failed
Enter the name of the Food Truck:
Enter the first menu item name:
Enter the price of the first menu item:
Enter the second menu item name:
Enter the price of the second menu item:
Enter the third menu item name:
Enter the price of the third menu item:
Bangos
______________________________
Maple Boy.................7.00
Cauli Wrap................9.50
Chicken Bacon Wrap........9.50
______________________________
Check 5 failed
Enter the name of the Food Truck:
Enter the first menu item name:
Enter the price of the first menu item:
Enter the second menu item name:
Enter the price of the second menu item:
Enter the third menu item name:
Enter the price of the third menu item:
The Smoke'n Pig BBQ
______________________________
Pulled Pork Sandwich......6.50
Baked Mac & Cheese........4.25
Loaded Fries.............10.00
______________________________

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!