Question: 1. Define and call simple functions 2. Passing parameters to functions 3. Variable scope This lab maps to learning objectives 1, 2, and 3 for

1. Define and call simple functions 2. Passing parameters to functions 3. Variable scope This lab maps to learning objectives 1, 2, and 3 for Competency Five (part 1): Write a Working Program Using Functions that Include Parameters, Local Variables Part 1A: Design a Solution For this portion of the lab, you will reuse the program you wrote in Lab 4. That means you will open the lab you wrote in the previous assignment and change it. You should NOT start from scratch. Also, all the requirements/prohibitions from the previous lab MUST also be included /omitted from this lab. (That means DO NOT use a list, return, or a menu) In addition break, quit, exit, sys.exit, continue, or any other shortcut ion NEVER allowed. DO NOT use global variables Redesign the solution using functions. For this lab: 1. You will define a function named main() (LO 1) 2. You will get input in the main function and pass it to the following functions: (LO 2) a. milesToKm() b. FahToCel() c. GalToLit() d. PoundsToKg() e. InchesToCm() 3. Each function will require that you have a local variable to store the result of the calculation. This result will then be displayed using the print statement from within the function (LO 1, 2, 3) Part 1B: Code Use the design you created in part A. Write a complete and syntactically correct Python program. Use the IDLE programming environment if you are using Python with IDLE. Some of you may be using Komodo or some other Python IDE. Please save your file as firstname_lastname_Lab5A.py where you will replace firstname and lastname with your actual first name and last name. Remember to use the extension .py. Run and test your program. Once you are sure it works you will turn in the items listed in the next section. Turn In All labs will be graded in Blackboard. Once you are done with the lab turn it in to the Lab 5 PartA link. Please read the How To Submit instructions if you have any questions or contact the instructor / academic coach. For this lab you will turn into Blackboard: 1. The Python codefile you saved in part B 1. Define and call simple functions 2. Passing parameters to functions 3. Variable scope This lab maps to learning objectives 1, 2, and 3 for Competency Five (part 1): Write a Working Program Using Functions that Include Parameters, Local Variables Part 1A: Design a Solution For this portion of the lab, you will reuse the program you wrote in Lab 4. That means you will open the lab you wrote in the previous assignment and change it. You should NOT start from scratch. Also, all the requirements/prohibitions from the previous lab MUST also be included /omitted from this lab. (That means DO NOT use a list, return, or a menu) In addition break, quit, exit, sys.exit, continue, or any other shortcut ion NEVER allowed. DO NOT use global variables Redesign the solution using functions. For this lab: 1. You will define a function named main() (LO 1) 2. You will get input in the main function and pass it to the following functions: (LO 2) a. milesToKm() b. FahToCel() c. GalToLit() d. PoundsToKg() e. InchesToCm() 3. Each function will require that you have a local variable to store the result of the calculation. This result will then be displayed using the print statement from within the function (LO 1, 2, 3) Part 1B: Code Use the design you created in part A. Write a complete and syntactically correct Python program. Use the IDLE programming environment if you are using Python with IDLE. Some of you may be using Komodo or some other Python IDE. Please save your file as firstname_lastname_Lab5A.py where you will replace firstname and lastname with your actual first name and last name. Remember to use the extension .py. Run and test your program. Once you are sure it works you will turn in the items listed in the next section. Turn In All labs will be graded in Blackboard. Once you are done with the lab turn it in to the Lab 5 PartA link. Please read the How To Submit instructions if you have any questions or contact the instructor / academic coach. For this lab you will turn into Blackboard: 1. The Python codefile you saved in part B

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!