I made following functions but it generates errors when I use main functions despite no error without usage of main function
def setup_name():
print("Before we start...","\n"
"What is your name?")
char_name = input("Name : ").strip().capitalize()
return char_name
def intro():
print(cname," is building great walls now")
print()
cname = setup_name()
intro()
But below gives me error
def setup_name():
print("Before we start...","\n"
"What is your name?")
char_name = input("Name : ").strip().capitalize()
return char_name
def intro():
print(cname," is building great walls now")
print()
def main():
cname = setup_name()
intro()
main()
To me, it seems no difference exist here so I think i need some sharp eyes.
Thanks!