Question: Snippet A def get _ ticket _ price ( ) - > int: age: int = int ( input ( What is your age?
Snippet A
def getticketprice int:
age: int intinputWhat is your age?"
if age :
price: int
else:
price: int
return price
Snippet B
def getticketprice int:
age: int intinputWhat is your age?"
if age :
price: int
elif age :
price: int
else:
price: int
return price
Snippet C
def getticketprice int:
age: int intinputWhat is your age?"
if age or age :
price: int
else:
price: int
return price
Snippet D
def getticketprice int:
age: int intinputWhat is your age?"
if age :
price: int
elif age :
price: int
return price
Select the two snippets that result in the same value for price given any input.
Choice of : Snippet A
Choice of : Snippet B
Choice of : Snippet C
Choice of : Snippet D
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
