Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that performs the following: (1) ask user to enter the prices (in float data type) of banana, apple, and orange, respectively. -

image text in transcribed
Write a program that performs the following: (1) ask user to enter the prices (in float data type) of banana, apple, and orange, respectively. - (2) calculate the average price of these three fruits. - (3) use the format function to round their average price to one decimal place. - (4) concatenate the dollar symbol \$ to the left of the formatted average price (string concatenation must be used), and print out the result as shown in the screenshot below. [Run your program in Python IDLE to get rid of syntax errors and verify if the program works correctly as described above. Program that cannot run due to syntax error(s) will receive 0 point.] How much is a banana: 0.5 How much is an apple: 0.8 How much is an orange: 0.7 The formatted average price is: $0.7

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions