I need help with code

https://replit.com/@Nathanielcodes/DarkorangeDodgerblueRouter#main.py
I need help with a code I am doing so what I am trying to do is it will ask for age race name,birthday not in that order then it will ask if you want another record/if it wants you to ask it again and if you say no then it will print your input.Thank you for reading please try to get back to me

Found out that there are errors in your code. You need to set a format for your inputs so that it will work with your code. If you don’t, it can lead to string to integer errors.

1 Like

Try recursion for funness points

def get_record():
  name = input("Name: ")
  age = input("Age: ")
  race = input("Race: ")
  birthday = input("Birthday: ")
  
  another = input("Would you like to submit another record? ").lower()
  if another in ["y", "yes"]:
    get_record()
  else:
    print(f"Age: {age}")
    print(f"Name: {name}")
    print(f"Race: {race}")
    print(f"Birthday: {birthday}")


get_record()
1 Like

But your real problem is that you are using a while loop checking if your answer is equal to “Yes” but you have set it to “” and never changed it.

1 Like

Thank you so much.This really help’s me out a lot.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.