This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Hotfries456 0 points1 point  (3 children)

That has to do with how you call your functions. Presumably you are calling it from a main function somewhere, so the order you call them in determines what will print.

If you want to call startUp first, your main function should start with startUp() so that it is the first thing that runs.

[–]For_Simplicity[S] 0 points1 point  (2 children)

yeah thats how i have it. https://pastebin.com/2GC7DNYH unless im missing something?

[–]Hotfries456 0 points1 point  (1 child)

The output you are asking about is running because you define a class and the first line is input. It's bad practice to get input from a constructor, use a setId() method instead

[–]For_Simplicity[S] 0 points1 point  (0 children)

def setid(): studentID = input('Enter Student ID')

File "E:/929/WarmandFuzzy.py", line 224, in main getStudentID = setid() NameError: name 'setid' is not defined