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

Lab9_Problem1

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

Lab9_Problem1

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 1
Write a Python program that receives a positive number and stores it in a variable x. (Note that a
user will enter only a number – no string.) The program computes and shows the area of a circle
whose radius equal to this number and the area of a square whose length equal to this number. The
program will use two functions as follows.
• A function called CirArea(x) computes the area of a circle whose radius is x.
• A function called SqArea(x) computes the area of a square whose length is x.
The output should look similar to the following.

You might also like