Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview Create a program that will format a food truck menu Objectives - gain familiarity with f string formatting - understand format specifications for different

image text in transcribed

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 - menu item 1 - price of menu item 1 - menu item 2 - price of menu item 2 - menu item 3 - price of menu item 3 You may use whatever prompts you wish to get the inputs. Then, your program should print a blank line followed by the day's 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: Monday's StreetFood Tacos de Carne Asada 10 Fajitas 10 Vegan Bowl 9 the output is: Monday's streetFood Tacos de Carne Asada....10.00 Fajitas..............10.00 Vegan Bow1...........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: This Lab contains hidden test cases. This means that there are some test cases where zyBooks will not show you what it is inputting, nor where your output may be wrong. But if you do the visible test cases properly, you should also pass all of the hidden test cases

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

Identify specific techniques to be used.

Answered: 1 week ago

Question

8. Explain competency models and the process used to develop them.

Answered: 1 week ago