Waynes world?


#1

This is the goal:

Write a function called string_function that takes in a string argument (s) and then returns that argument concatenated with the word 'world'. Don't add a space before world!

You add n + world with n = hello

I did this yet an error pops saying it does not print out "Waynes world", despite my previous error before saying my first did not print "helloworld', space omitted, now I get this waynes world, where was this mentioned in the steps or the instructions?

The error: Oops, try again. string_function('Waynes') returned 'Helloworld' instead of 'Waynesworld'

Lesson: https://www.codecademy.com/courses/python-beginner-nzzVa/1/3?curriculum_id=4f89dab3d788890003000096#


Replace this line with your code.


#2

It is probably part of Codecademy's test cases to see if you passed. The goal is to return ANY word concatenated with 'world'. Not just hello.

You function should take argument s not n. So you are dealing with your s variable in your function. Should be
return s + 'world'


#3

I tried my own s, got an error telling me it isn't helloworld.

string_function('Hello') returned 'penworld' instead of 'Helloworld'

So am I supposed to do waynes world or hello world?

Maybe I'm too stupid to understand the steps and im missing something.


#4

May I see your code?


#5

I solved it, my fault. Sorry for the trouble.


#6

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