Minor bug?


I am 99% sure that mi code is correct...


well, in a way your code is correct. But what if we add another function call:

print string_function("try")

then your function returns helloworld while it should return tryworld


But, this is the beginning off the exercise... It hasn't even asked for another function... :confused:


@stetim94 meant function CALL. Not another function. It's in his comment.

Such as if you were to type
print string_function("try") under your other print statement, it won't print tryworld but rather Helloworld again.


the purpose of adding another function call, was to demonstrate your function works for a very limited number of strings, while it should work for every string you pass as argument


Yes, I understand that, however, the system hasn't even mentioned the "Waynes" function... It's only asking me for the "n" function and when I try to change or add the waynes function... It throws the "It did not print "Helloworld" error...


waynes isn't a function, its a string argument.

both "waynes" and "Hello"should work for your function.

the string you pass as argument, is copied into the function parameter s, so the function should return s + "world"


Oooooooooooooh ok ok... I got it... Thank you all for your help :smiley:


The instructions say def string_function(s) but it should be (n).


Not so. Shake the n idea and study the concept being explored here. n is not a constant in the function, 'world' is.


Do you have any material you could recommend? I'm barely getting into coding


It won't hurt to put programming aside just long enough to read a book or two on the subject of computers in general. Get a feel for how computers came into being and the range of applications that have evolved, pre and post PC days.

The terminology you pick up from that reading will be invaluable, and the level of comprehension for computing concepts and ideas goes up sharply. That will make learning a programming language seem more welcoming and easier to get a feel for.


I actually learned some being a self taught tech on a swap meet, and recently I found cybrary, those dudes are cool on the theory part, on which I had none, and I am taking several of their courses. And I've been trying to get into coding since I want to move up to be a PenTester, and I heard the best ones craft their scripts... I tried getting into it directly... But it's like trying to fly a spaceship without even been on a plane :stuck_out_tongue:


Shoot for the moon to clear the fence. At least in theory it's the correct attitude but sooner or later the work needs to get done. This is not a cake walk, no matter what anybody says. An average mind with extraordinary commitment and drive can take any field to new heights. Imagination knows no intellectual bounds. It's the person who succeeds.

Biologists don't start with DNA. They start with cells.


That... Is actually the nicest thing someone's said to me about this... Thank dude


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.