The variable or the types and the costs:
pasta_types = "Lasagne, Spaghetti, Macaroni, Cannelloni, Ravioli, Penne, Tortellini, Linguine, Farfalle, Fusilli"
pasta_costs = "6.00, 4.00, 3.15, 8.50, 9.00, 3.15, 5.00, 4.00, 4.25, 4.75"
The function to see if the in put has a type of pasta that is in the varaible:
def inventory(pt):
return(pt.title() in pasta_types)
Input:
type = input('What pasta would you like: Lasagne, Spaghetti, Macaroni, Cannelloni, Ravioli, Penne, Tortellini, Linguine, Farfalle, and Fusilli ')
Calling Function:
have = inventory(type)
How do I find out what number of the argument that was chosen?