Related questions
this is an old reference guide question found on the internet
Using the starter code that includes two functions that convert between metric and imperial values for distance (inches <-> centimeters) and weight (pounds <-> kilograms), your job is to test these functions. You should write a main() in test_measurements.py; when we run it, we should see all of your tests, the expected result for each one, and the actual result for each one.
*** Testing inches -> cm conversions
Converting 0 inches to centimeters:
>>result = 0.00 expected = 0.00
Converting 1 inches to centimeters:
>> result = 2.53 expected =2.54
*** testing cm-> inches conversions
Converting 0 centimeters to inches:
>> result = 0.00 expected = 0.00
Converting 38 centimeters to inches:
>> result = 14.96 expected = 14.96
PYTHON STARTING CODE
Step by stepSolved in 2 steps
- python: Write a program that will find the area and perimeter of a circle with a radius given by the user. Create two functions to do the calculations. The function to compute the area should return 3.14*radius**2. The function to compute the perimeter should return 2*3.14*radius. Include a try/except to ensure that the user is entering a numeric value.arrow_forwardNeed help on this question and can you explain how as well?arrow_forwardA non-profit organization has asked you to build a computer programming system thatkeeps up with the number of hours a volunteer has worked each week.Since no volunteer will work more than three days, the organization wants the volunteersto be able to enter their name and the hours volunteered for each of the three days theycame in each week.The program will also make sure that the data entered is valid. The program will make surethe hours entered are a positive number and that the hours are no more than 8 hours eachday. If the volunteer enters an invalid number of hours, then the program will ask them tore-enter the value and repeat the data entry process.You can follow these steps to guide you through the process:1. Create a public class named Volunteer and one named VolunteerEntry.2. The Volunteer class will contain instance variables for each object to hold datapertaining to each object as needed. It will store the values for the volunteer’s name, IDand total hours worked for the...arrow_forward
- I can't seem to figure this out.. for python You have a business that cleans floors in commercial space and offices. You charge customers 0ドル.45 per square yard, and some customers require multiple cleanings every month. You need two custom functions for your business. The first function takes a floor's length and width in feet and returns the area in square yards. The second void function takes the area, charge per square yard, and number of monthly cleanings as arguments and prints the cleaning cost. This latter function uses selection logic to print different output for single and multiple monthly cleanings (see Sample Outputs). Use a properly named constant for the charge per square yard, too.arrow_forwardWrite a program that will allow a teacher to calculate the average test score for a certain number ofstudents for the three courses he teaches. The teacher can enter the course name and the number ofstudents who took the test in that course, and then can enter the score for each student. Your programwill then calculate the average score and print out the results for each course. Your program must usethe appropriate loop, functions, and can run multiple times.You will need to:- Define a nested loop: an inner loop for the three courses and an outer loop for allowing the teacherto run the program again.- Define a function to enter the names of the courses.- Define a function to enter the scores of students for the courses (you must use range function toloop through the number of students).- Define a function to calculate the average score of each course.- Define a function to print out the average score of each course with course name.arrow_forwardYou guys use AI tool to answer. Last time I found plagiarism and AI detection in my answer. Now If you will use these things I'll surely give multiple downvotes and will report ⚠️ sure.arrow_forward
- The language we are using here is in Racket. Please enter the following code: (if (equal? 8 3) 9 10) Modify the condition following if to get a different value to return. [Note that Racket pays no attention whatsoever to how you indent your code. The above indenting is stylistically useful to see what the "if" function is doing.]arrow_forwardWrite a set of functions that calculate the cost of movie tickets for a family. Using a loop, keep asking: The age of the movie goer. Based on this age, you will charge them these amounts: Under age 3, the ticket is free. If they are between 3 and 12, the ticket is 10ドル.25. If they are over age 12, the ticket is 15ドル.50. If they are 55 or older, the ticket is 12ドル. If they buy at least 4 tickets, they receive a 20% discount. Then, keep a running_total that is output to the screen after each age has been entered. This running_total should be accessed through the functions using a pass-by-reference variable: &running_total The other function parameter variables are to be pass-by-value. Tell them to enter a zero when they want to stop. Finally, calculate the total cost including a 7.5% sales tax. and output it to the screen. Be sure that the code is broken up into functions with good comments. Put as little code in main() as you can get away with and still make sense....arrow_forwardI need help with this questionarrow_forward
- Write a function called ConvertToFootInchMeasure (signature below) that takes a parameter for the total inch measure. The function should return the converted measure as a formatted string (with the " and ' as appropriate). Use the following header: string ConvertToFootInchMeasure (int totalInches)/* Pre: totalInches the total number of inchesPost: The converted, formatted measure is returned */arrow_forwardI ran the code and still got the same error. The code still needs the value head. Please fix the code and show screenshots of the correct code with the output. Make sure to use various test cases to test the code to make sure it works. Attached are images of the directions.arrow_forwardI keep running this code as seen in the first picture and it keep giving me this error message seen in the second picture and I don't understand why. the initial question is: Allow a user to enter any number of double values up to 15. The user should enter 99999 to quit entering numbers. Display an error message if the user quits without entering any numbers; otherwise, display each entered value and its distance from the average. if that helpsarrow_forward
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education