Question: num _ widget = 0 while True: choice = input ( Would you like to buy a widget? ( y / n ) :

num
_
widget
=
0
while True:
choice
=
input
(
"
Would you like to buy a widget?
(
y
/
n
)
:
"
)
if choice.lower
(
)
=
=
"
y
"
num
_
widgets
+
=
1
else:
break
print
(
f
"
You bought
{
num
_
widgets
}
widget
(
s
)
today."
)
Refer to Code Example
3
-
1
.
If the user enters
"
Y
"
If the user enters "no" at the prompt, what does the program print to the console?

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 Finance Questions!