Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: Write a python program to show the user a menu with the following options Square, rectangle, circle, right triangle, distance of two points

image text in transcribed
Question 1: Write a python program to show the user a menu with the following options Square, rectangle, circle, right triangle, distance of two points and exit. Define 5 functions for cach option and implement the followings inside each function. Square function Calculates the area, the perimeter and the length of diagonal and finally displays all details. Rectangle function: Calculates the area, the perimeter and the length of diagonal and finally displays all details Circle function: Calculates the area, the circumference and the length of diameter and finally displays all details Right triangle function: First it should check whether it is a right triangle or not, if yes then calculates the area of the triangle. And finally displays all details (if it is not a right triangle, it should ask the user to enter correct values Distance of two points Calculates the distance between two points. Note: all of the functions get the inputs) from the user. Question 2: Write a python program to display a receipt of ordered foods by a customer at a restaurant, The receipt should contain customer name, appetizer and its price, main meal and its price, dessert and its price and total price. Your program should have 4 global lists (appetizer, main meal, dessert order) and the first three lists contains foods with their prices. (add any food with any price that you like) (Hint: nested list) Define 3 functions for appetizer, main meal and dessert. Each function should show the list of corresponding foods with their prices and the user should be able to add the desired food to "order" list

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions