Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help with Python plz. Algorithm on using a function: 1. From the keyboard, enter values for ProductPrice, Quantity, and DiscountStatus (values are the text/string/words

image text in transcribed

need help with Python plz.

Algorithm on using a function: 1. From the keyboard, enter values for ProductPrice, Quantity, and DiscountStatus (values are the text/string/words High or Low) 2. Create a function that takes ProductPrice and Quantity as input and returns ProductCost which is computed as ProductPrice times Quantity 3. Create a function that takes Product Cost and DiscountStatus and returns FinalCost which is computed as follows: if DiscountStatus is High FinalCost = ProductCost * 0.90 # 10% reduction - - 100 - 10 = 90 otherwise FinalCost = ProductCost * 0.95 #5% reduction -- 100-5 = 95 return FinalCost 4. execute the function that returns ProductCost 5. execute the function that returns FinalCost 6. print FinalCost

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_2

Step: 3

blur-text-image_3

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions