Question: Question 1 4 4 pts Consider the follow code segment. It is designed to classify widgets as too small if they are less than 1
Question
pts
Consider the follow code segment. It is designed to classify widgets as too small if they are less than in diameter or too large if they are in diameter or more.
Otherwise they should be classified as just right. However, this code may contain a bug. Examine the program, and identify what bug, if any, is present.
if size :
printToo smal
elif size : :
printJust right"
elif size :
printToo big"
The greater than or equal signs need to be replaced with greater than signs
All instances of elif need to be replaced with else
The order of the conditions and bodies must be changed
There is nothing wrong with the code segment it works as intended
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
