Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Data Programming: PYTHON Write a program that takes values of length and breadth of a rectangle from the user and check if the shape is

Data Programming: PYTHON

Write a program that takes values of length and breadth of a rectangle from the user and check if the shape is square or not. .

A shop will give a discount of 10% if the total cost of the purchase is more than $800. Each item in the store costs $100. Write a program to ask the user to enter the number of purchases, and print the total cost for the user. The program should only accept numeric inputs. For non-numeric inputs, display a message.

Output:

a) No discount. Your total cost is $700.

b) You get a discount of $120, and your total cost is $1080.

c) Please enter a numeric input.

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 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions

Question

=+What is the nature of the unions in the particular country?

Answered: 1 week ago