Question
PYTHON CODE 8. Fix It: The following howMany Program has errors. Find and correct the errors then test that the program runs successfully. Write line
PYTHON CODE 8. Fix It: The following howMany Program has errors. Find and correct the errors then test that the program runs successfully. Write line comments to show what you changed to fix the program. howMany Program: # define the function howMany: howMany(): requested = input(enter how many you want: ) return Requested # Get user input numberNeeded numberNeeded = howMany() prnt(numberNeeded, will be ordered) 6. Hat Program: Fix the code sequence in the code below so the hatAvailable() function is available when called and the code runs without error. haveHat = hatAvailable(green) print(Hat available is , haveHat) def hatAvailable(color): hatColors = black, red, blue, green, white, grey, brown, pink Return(color.lower() in hatColors)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started