Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that inputs the name, quantity, and price of three items. The name may contain spaces. Output a bill with a tax rate

Write a program that inputs the name, quantity, and price of three items. The name may contain spaces. Output a bill with a tax rate of 6.25%. All prices should be output to two decimal places. The bill should be formatted in columns with 30 characters for the name, 10 characters for the quantity, 10 characters for the price, and 10 characters for the total. Sample input and output are shown as follows:

on Python Idle

image text in transcribed

Input name of item 1: lollipops Input quantity of item 1: 10 Input price of item 1: 0.50 Input name of item 2: diet soda Input quantity of item 2: Input price of item 2: 1.25 Input name of item 3: chocolate bar Input quantity of item 3: 20 Input price of item 3: 0.75 Your bill: Item lollipops diet soda chocolate bar 20 Subtotal 6.25% sales tax Total Quantity Price Total 10 0.50 5.00 1.25 3.75 0.7515.00 23.75 1.48 25.23

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions

Question

Question In Chemical Engineering, Don't Give AI Answer 2 7 3 .

Answered: 1 week ago

Question

define the term outplacement

Answered: 1 week ago

Question

describe the services that an outplacement consultancy may provide.

Answered: 1 week ago