Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Assignment For this lab you will write the following 4 functions and a main: getInput ) This function should take no parameters and return

image text in transcribedimage text in transcribedimage text in transcribed

Lab Assignment For this lab you will write the following 4 functions and a main: getInput ) This function should take no parameters and return the following four values read from user input in the order listed below. Input a color. Input a number. Input a second number Input a season. The prompts for these inputs can be whatever you'd like printcolor This function should take 1 parameter and return nothing. It should print out the sentence "Favorite color is parameter where parameter is the color passed to the function. addNumbers ) This function should take 2 number parameters and return their sum. setGlobal) This function should take 1 parameter and return nothing. This function should set the global variable favoriteseason to the value of the parameter main() This function should take no parameters and return nothing. This function should first call getlnput0 and unpack the four resulting variables. It should then call printColor with the first unpacked value. Then call addNumbers with the float of the second and third unpacked value. Then call setGlobal with the fourth unpacked value. main.py 1 favoriteSeason 3 if-name__== '-main-' : 4mainO

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions