0% found this document useful (0 votes)
3 views

Lab9_Problem10

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lab9_Problem10

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ITS100 Introduction to Computers and Programming

Lab 9 – Problem 10
Write a Python program with two functions. The program asks a user to choose whether to compute
the area of a square (s) or the area of a circle (c).
• If the user chooses to compute the area of a square, the program will ask the user to enter the
length x, uses a function called “SquareArea(x)”, and print out the corresponding area.
• If the user chooses to compute the area of a circle, the program will ask the user to enter the
radius r, uses a function called “CircleArea(r)”, and print out the corresponding area.
• If the user enters other inputs (not s or c), the program will print out Wrong Input.
The output of the program should look similar to the following.

You might also like