Question: Problem 3. Calculations Given the length and width calculate the area and perimeter of a rectangle. Test Case: length = 12.50, width = 4.25 Use
Problem 3. Calculations Given the length and width calculate the area and perimeter of a rectangle. Test Case: length = 12.50, width = 4.25 Use these values in your program. Remember that you can input values from the keyboard with the input statement like this: length = input("Enter the length of the rectangle) width=input("Enter the width of the rectangle) Using the length and width from above calculate the area of a triangle with base the same as length and height the same as width. Using the length as the value for radius calculate the area of a circle. Print all three answers to the screen. Problem 4. String Processing Suppose that you have the following sentence stored in variable sentence: sentence = "UAHCS100FALL2020MW02:40-04:00" Write a Python program that will make the following edits: replace FALL with SPRING replace MW with TT replace 2020 with 2021 replace 02:40-04:00 with 09:40-11:00 Print out the updated sentence which should be: UAHCS100SPRING2021TT09:40-11:00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
