Page 1 of 1

Program 1 Write a function called SumOfThree that accepts 3 floating point numbers as parameters. The function should re

Posted: Fri Jul 08, 2022 6:39 am
by answerhappygod
Program 1Write a function called SumOfThree that accepts 3 floating pointnumbers as parameters.The function should return the sum of the numbers.Write a function called AvgOfThree that accepts 3 floating pointnumbers as parameters.The function should return the average of the numbers.Write a function called BigOfThree that accepts 3 floating pointnumbers as parameters.The function should return the LARGEST of the 3 numbers.Write a program that gets 3 integers from the user and then usesthe functions SumOfThree,AvgOfThree, and BigOfThree to find the sum, average, and largest ofthe 3 numbers. Theresults should be printed to the user’s screen. The user interfaceshould be easy to use andformatted with care.Program 2
Write a function called FindArea that takes in 2 parameters- theheight and width of a rectangle.The function should return the area of the rectangle. Hint: area =width * heightWrite a python program that asks the user for a height and width,uses FindArea to find the areaof the rectangle, and outputs the area of the rectangle to theuser.Program 3It is still very common to create phone numbers that include wordsso that they are easy toremember. For example, 1-800-flowers or 1-800-taxiusaWrite a function (name is up to you!) that accepts the last 7characters of a 1-800 number andturns them into numbers, based on the letters and numbers assignedon the dial of a phone. If thecharacter is a number- then use that number. Otherwise, translatethe letter into a number. Thefunction 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 yourfunction to translate the the last 7 numbers of the number tonumbers.Your program should output the 1-800 number as a series of numbers.(you may format thenumbers if you like!)For example:Please enter a 1-800 number you would like to translate. Do notincludehyphens: 1800BIGFISHThe number you want to call is: 18002443474