Python Forum

Full Version: Need help with HW
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
https://gyazo.com/c03806919d712d9d6b2b221c7531bc16

Hi all, I just started python. I have no idea how to do this and would like help on it or a possible solution.
chessboard

If I answered this way, it would be about as informative as what you have
posted.

Please give a clear description of what is that you are trying to do,
what you have tried so far, and exactly where you think you need help.
@LilPump
Read the first chapters, then you know how to do.
https://www.python-course.eu/python3_interactive.php
Uhh i tried
def name(Brandon)
print('Hello world, name)
for the w/o return statement, but I get a invalid syntax. I want to use print to print Hello world, Brandon, and define name=Brandon.

With the return statement I have
def name(user):
    return('Hello World,user'% user)
print(name('Brandon'))
I get this error:
line 2, in name
return('Hello World,user'% user)
TypeError: not all arguments converted during string formatting

Can someone help?
change to:
return('Hello World,{}'.format(user))
@LilPump
Now you have all code you need, good luck.