Answered step by step
Verified Expert Solution
Question
1 Approved Answer
AutoSave OFF Sve w Week05 Lab-Saved to my Mac Q Home Insert Draw Design Layout References Mailings Review View Tell me Share 0 Comments X
AutoSave OFF Sve w Week05 Lab-Saved to my Mac Q Home Insert Draw Design Layout References Mailings Review View Tell me Share 0 Comments X Calibri (Bo... V 11 T AaBbDdEe. AaBbcDdEe AaBbCcDc "Ai Aa A x APA Paste I B Normal U v ab x No Spacing Heading 1 Dictate Styles Pane Sensitivity Variables Exercises 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 Page 1 of 3 164 words English (United States) Focus + 114% AutoSave OFF Sve w Week05 Lab-Saved to my Mac Q Home Insert Draw Design Layout References Mailings Review View Tell me Share 0 Comments X Calibri (Bo... V 11 ' Aa 21 T AaBbDdEe AaBbcDdEe AaBbCcDc Paste B I U v ab x x Normal APA No Spacing Heading 1 Dictate Styles Pane Sensitivity 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: 75 Tax: 3.75 Price After tax: 78.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. 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 1 Page 2 of 3 164 words CE English (United States) O Focus + 114% AutoSave OFF Sve w Week05 Lab-Saved to my Mac Q Home Insert Draw Design Layout References Mailings Review View Tell me Share 0 Comments X Calibri (Bo... V 11 ' Aa T AaBbDdEe. AaBbcDdEe AaBbCcDc Paste B I U v ab x x Normal APA No Spacing Heading 1 Dictate Styles Pane Sensitivity 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 BM! Screen Code Please eneter the weight kg: 75 Please eneter the height in meters: 171 Your body mass index is: 0.0026 E Page 3 of 3 164 words CE English (United States) O Focus + 114%
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started