#๐Ÿ”’ what's the difference

20 messages ยท Page 1 of 1 (latest)

pliant shoal
#

I can't understand why the second code is not running

wise harborBOT
#

@pliant shoal

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

prisma pilot
#

Print vs print

distant sphinx
#

you have Print instead of print

#

def PrintData(self) vs def printData()

hexed nymph
reef kelp
#

No the issue is that the class doesn't have the attribute you were trying to assess

prisma pilot
#

they've set the instance attributes. The problem is only the lowercase p

sly roost
prisma pilot
#

The IDE is probably showing them underlined because they are unused

thorny ember
#

name and train defined??

reef kelp
pliant shoal
#

GUYS IT WORKED THANKS

reef kelp
pliant shoal
#

I just had to
def printData(self):

#

I thought it's better to use Pascal case

rancid cosmos
#

python standard is snake_case

reef kelp
wise harborBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.