Write a function called FindArea that takes in 2 parameters- theheight and width of a rectangle. The function should returnthe area of the rectangle. Hint: area = width *height
Write a python program that asks the user for a height andwidth, uses FindArea to find the area of the rectangle, and outputsthe area of the rectangle to the user.
Program 3
It is still very common to create phone numbers that includewords so that they are easy to remember. For example,1-800-flowers or 1-800-taxiusa
Write a function (name is up to you!) that accepts the last 7characters of a 1-800 number and turns them intonumbers, based on the letters and numbers assigned on the dial of aphone. If the character is a number- then use thatnumber. Otherwise, translate the letter into a number. The function should return the last 7 characters of the 1800 numberentered by the user.
Now- write a Python program that asks the user to enter a 1-800number, and then uses your function to translate the the last 7numbers of the number to numbers.
Your program should output the 1-800 number as a series ofnumbers. (you may format the numbers if you like!)
For example:
Please enter a 1-800 number you would like to translate. Do not include hyphens: 1800BIGFISH
The number you want to call is: 18002443474
Write a function called FindArea that takes in 2 parameters- the height and width of a rectangle. The function should r
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am