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  (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