Check out this BF interpreter:
https://gkucmierz.github.io/brainfuck-interpreter
You can see HEX output in this.
It means that your solution does not work when called like this: hello() i.e. without parameters.
hello()
It should work when called with either one param (hello("Steve")) or without params (hello()).
hello("Steve")
I still can't figure it out...
Read the posts below asking the same.
What does the following error mean? Traceback (most recent call last): File "main.py", line 14, in test.assert_equals(hello(), "Hello, World!") TypeError: hello() missing 1 required positional argument: 'name'
You're right, sorry. I had put >++. by mistake at the end. 🤦
>++.
"Hello World!" has 12 chars, your code has 13 . operations. This solution cannot be correct.
.
This comment is hidden because it contains spoiler information about the solution
Print the terms of the sum, they're wrong.
Have you read the error message? It should be obvious what "expected X, instead got Y" means.
Now, that problem is solved but you still need to address this point:
... or says Hello, World! if name is not given (or passed as an empty String).
Read the error message:
Failed asserting that two strings are equal. Expected: 'Hello, World!' Actual : 'Hello, !'
Don't change the sample tests to make your code "work", it's the other way around.
And what get you that idea? Please, use the starting code as it is, don't change the function's name or create a class, it won't work.
Loading collection data...
Check out this BF interpreter:
https://gkucmierz.github.io/brainfuck-interpreter
You can see HEX output in this.
It means that your solution does not work when called like this:
hello()
i.e. without parameters.It should work when called with either one param (
hello("Steve")
) or without params (hello()
).I still can't figure it out...
Read the posts below asking the same.
What does the following error mean?
Traceback (most recent call last):
File "main.py", line 14, in
test.assert_equals(hello(), "Hello, World!")
TypeError: hello() missing 1 required positional argument: 'name'
You're right, sorry. I had put
>++.
by mistake at the end. 🤦"Hello World!" has 12 chars, your code has 13
.
operations. This solution cannot be correct.This comment is hidden because it contains spoiler information about the solution
Print the terms of the sum, they're wrong.
This comment is hidden because it contains spoiler information about the solution
Have you read the error message? It should be obvious what "expected X, instead got Y" means.
Now, that problem is solved but you still need to address this point:
Read the error message:
Don't change the sample tests to make your code "work", it's the other way around.
This comment is hidden because it contains spoiler information about the solution
And what get you that idea? Please, use the starting code as it is, don't change the function's name or create a class, it won't work.
Loading more items...