Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1: Calculate area of shapes for triangle and rectangle Triangle area = (Height Triangle)/2 Rectangle area = Rectangle Height - Rectangle width Screen Code

image text in transcribed
image text in transcribed
image text in transcribed
Exercise 1: Calculate area of shapes for triangle and rectangle Triangle area = (Height Triangle)/2 Rectangle area = Rectangle Height - Rectangle width Screen Code Enter the triangle height: 2 Enter the triangle base: 3 Enter the rectangle height: 4 Enter the rectangle width: 3 Triangle area is 3.0 Rectangle area is 12.0 Exercise 2: Write python program to read two items prices and quantities, then calculate the vat value, total cost and display the total without vat, the vat value, and the total with the vat value Code Screen Enter the price of first item: 50 Enter the quantity of first Item: 3 Enter the price of Second item: 25 Enter the quantity of Second Item: 3 Total Before Vat price 225.0 dhs Vat Value 11.25 dhs Total After Vat price 236.25 dhs Exercise 3: Write python program to read the user name, the number of pizza the user want, the vat value. Calculate the vat and the total cost including the vat value. Consider the pizza has a fixed prices of 25 AED. Screen Code Please enter your name: Ossama Hello Ossama How many pittza you want?: 3 Enter tax rate: 5 Pizza Number: 3 Price for each: 25 Price before tax: Tax: 3.75 Price After tax: 78.75 75 Exercise 4: Write python program to read the user name, age then display Hello message followed by the user name, and display the age after 5 years. 4 Screen Code Please enter your name: Ossama Please enter your age: 39 Hello Ossama Your age is 39 Your age after 5 years is 44 Exercise 5: Write a python program that read weight (kg) and height (m) of a person, calculate and display his BMI (Body mass index). kg BMI- m Code Screen Please enetor the weight kg: 75 Please enetor the height in meters: 171 Your body mass index is: 0.0026 >

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

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago