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 PX
def main :
DISCOUNT
product input Enter product:
price getpriceproduct
if product SALEITEM:
message
price price DISCOUNT
print fPrice is $price:f
def getprice p:
if p 'PXOO':
return
elif p Px:
setuxn
else:
retuxn
def message :
print SALEITEMis one sale this week!
main
Parameter is created each time function getprice 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
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
