I am making a couple of functions for taking pizza information in one, then using that information to calculate the price in the other function. When I run this though, it's having problems locating attributes in one of the functions, even after its run.
def calc_pizza_charge(size_cost, meats_cost, veg_cost, num_cost):
get_pizza_info.size = range(1, 4)
num_cost = get_pizza_info.quantity
total = (size_cost + meats_cost + veg_cost) * get_pizza_info.quantity
if get_pizza_info.size == 1:
size_cost = 6.50
if get_pizza_info.size == 2:
size_cost = 9.50
if get_pizza_info.size == 3:
size_cost = 11.50
meats_cost = (get_pizza_info.meats - 1) * 3.50
veg_cost = (get_pizza_info.veg - 1) * 1.50
print("Your total is $", "{:,.2f}".format(total))
def get_pizza_info(size, meats, veg, quantity):
size = int(input("Enter size from 1-3: "))
meats = int(input("Enter number of meat toppings "))
veg = int(input("Enter number of non-meat toppings "))
quantity = int(input("Enter number of these pizzas "))
if size >= 4:
size = 3
if size <= 1:
size = 1
if meats <= 1:
meats = 1
if veg <= 1:
veg = 1