So I was developing a python program for my school project that asks a customer for their details such as their Firstname,Lastname,Age etc. So I made a function called customer details.
def customerdetails():
Firstname = input("Enter your First name:")
Lastname = input("Enter your last name:")
Age = input("Age:")
Address =input("Enter your address:")
Postcode = input("Enter your Postcode:")
Email = input("Email:")
Phone = int(input("Phone Number:"))
customerdetails()
Now how can I print those variables such as Firstname, Lastname, Age, Address etc. I tried using the same logic we use to print normal variables, but it didn’t work.This is the code.
print("Please check your details")
print("***********")
print(Firstname)
print("***********")
It shows me an error that says “NameError: name ‘Firstname’ is not defined.”
What do I do ? Any help will be appreciated