Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
KingMilo6625y@No3x ohh.. i've run it, it says this in a red highlight AssertionError: None != 'Hello, World!'
-
No3x295yI don't know python well, neither exorcisms. But usually you write test cases (in code) against your test subject. Since this code is missing it's not obvious why the test fails.
-
No3x295yExorcisms is like a learning platform? Then please tell us the specification for the task. Probably you are missing a case and that's why the test fails.
-
KingMilo6625y@No3x Hello my friend, i'm sorry i could not respond quickly, however the task is as follows: The objectives are simple:
1)Write a function that returns the string "Hello, World!".
2)Run the test suite and make sure that it succeeds.
3)Submit your solution and check it at the website.
Yep! a learning platform -
KingMilo6625y@No3x O m g i fixed it!!! i'm so happy!, you know i've been actually trying to fix this problem since like 6PM its now 8:51PM, though it may be embarrassing since its a hello world problem.. however first time using Exercism!
-
No3x295yI think you are missing a return (returned value by the function is None).. and world is lower case in your code.
-
No3x295yI guess you tested an old version of your code without return by mistake. You can always check if you are testing the code you are intending to test by making a change in the code that produces some expected change in the output (e.g. introducing a syntax error).
-
KingMilo6625y@No3x to be completely honest i feel as if i may have been working with the completely wrong or separate file, i feel that the issue was that the test file 'hello_world_test.py' was actually picking up the original whilst i may have been making changes to another file, hope this makes sense and i appreciate the support along the way my friend :-)
-
VaderNT16345yJust a small improvement suggestion: You can replace format() with f-strings to make your code a bit more readable:
return f"Hello, {name}"
Good luck with your exercises!
Related Rants
Hey DevRant Fam!, hope everyone is very well,I just started using exercism with python inside my chosen editor Emacs, and well... the first problem i'm doing is the Hello World problem...
So the code i have is here:
def hello(name='world!'):
return "Hello, {0}".format(name)
hello()
and it prints out the output "Hello,World!"
but i'm getting a strange error in my command prompt saying something like this '1 Failed Assertion error None != 'Hello, World!'
anyone have some advice its my first time working with Exercism :-) cheers!
Thank you :-)
question
help
exercism