سؤال

I am a intro to python student working on a coding assignment. When I began to code I realized every time I tried to test the print () function Idle would not run my code. I typed it in exactly as follows:

def main():
     print("Enter 16-digit credit card number:")

     main()

It doesn't print anything. Did I do something very wrong, or is there something else going on?

Thanks y'all

هل كانت مفيدة؟

المحلول

unindent your call to main.

def main():
    print("Enter 16-digit credit card number:")

main()
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top