0
Function lesson
def hello(): print("Hello world!") hello() How is this code wrong? It will not let me continue! Please help
13 Answers
+ 6
Brian the closest I can see in that lesson is
def hello():
print("Hi!")
Can you share the location of the above code you mention...
+ 5
Abdelrhman Hesham Marzouk please do not provide chatgpt responses. This is neither warranted nor wanted in an e-learning environment where community members help community members based off personal knowledge and experience.
+ 3
Brian at this point I would screenshot the lesson your code and the attempt / results ...
And forward all details to
info@sololearn.com
So they can get to the bottom of the issue.
Python core course was removed from the catalog and was on the old learning engine so that may be the cause of the error and the replacement courses are the introduction to python course and intermediate python course ... on the current learning engine.
+ 2
Python Core
Lesson 2 under Functions & Modules.
+ 2
Is it as Aaron mentioned second to last page?
If that is it, did you comment out the function call before the function is defined?
+ 2
after emailing info@sololearn.com, it magically worked once I did the right sequence!
I was doing things in the wrong order. I started this module last year so my memory was foggy to the rhythm and how things worked.
I'm good now
+ 2
Brian glad to hear and thank you for the update.
+ 1
Brian the second to last page? With the code playground?
+ 1
Yes, that's the correct location.
"
Functions
You must define functions before they are called, in the same way that you must assign variables before using them.
CODE PLAYGROUND: PY
hello()
def hello():
print("Hello world!")
Click to run
level
The given code results in an error. Can you fix it?"
I tried everything, including commenting out the function call as you mentioned.
It still will not let me past this section.
I've literally tried ALL the comment suggestions too (that were in English)
It simply will NOT let me through.
+ 1
I have run every iteration of that code forever. i hit Run and NOTHING happens.
There is something wrong.
I copy and pasted your EXACT code into the lesson and nothing happened.
I deleted the comments too, NOTHING
I JUST WANT TO HIT THE CONTINUE BUTTON!!!! (It's still greyed out)
+ 1
Let me clarify:
i do indeed get the Hello world output
I just wanna move on with the lesson.
I also have done the right practice with inputting Tommy as the name for +5 exp
What else do I need to do?
+ 1
Hey! Alright!
0
If you make your code look like this will it work?
https://code.sololearn.com/cf8OVf9Mqjo3/?ref=app