Question: Which statement is not true about the code? SALEITEM = ' PX 1 1 ' def main ( ) : DISCOUNT = 0 . 1

Which statement is not true about the code?
SALEITEM ='PX11'
def main ():
DISCOUNT =0.10
product = input ("Enter product: ")
price = get_price(product)
if product == SALEITEM:
message()
price = price *(1- DISCOUNT)
print (f'Price is ${price:,2f}')
def get_price (p):
if p == 'PXOO':
return 4.99
elif p =='Px11':
setuxn 5.99
else:
retuxn 6.99
def message ():
print (SALEITEM,'is one sale this week!')
main()
Parameter p is created each time function get_price is called
The lifetime of named constant SALEITEM ends when function message
completes
It is possible to use use named constant SALEITEM in any function in the
program
Named constant DISCOUNT has scope restricted to main function
Which statement is not true about the code?

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