Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with HW
#1
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.

User has been warned for this post. Reason: Posting questions without effort on their part, incorrect sub-forum
Reply
#2
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.
Reply
#3
@LilPump
Read the first chapters, then you know how to do.
https://www.python-course.eu/python3_interactive.php
Reply
#4
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?
Reply
#5
change to:
return('Hello World,{}'.format(user))
Reply
#6
@LilPump
Now you have all code you need, good luck.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020