19th Nov 2021, 5:38 PM
Jackson Jameson
Jackson Jameson - avatar
13 odpowiedzi
+ 8
# add this as the last line: (NOT INDENTED) welcome_message() # you defined a function and just didn't call it
19th Nov 2021, 5:41 PM
Slick
Slick - avatar
+ 6
Call the function
19th Nov 2021, 5:41 PM
Jairo Soto
Jairo Soto - avatar
+ 4
thx guys
19th Nov 2021, 5:44 PM
Jackson Jameson
Jackson Jameson - avatar
+ 3
"call a function" means "use it in your script"
19th Nov 2021, 7:06 PM
Lisa
Lisa - avatar
+ 2
Just type welcome_message()
19th Nov 2021, 8:37 PM
Lovro Pokrajcic
Lovro Pokrajcic - avatar
+ 2
Jackson Jameson Like this def welcome_message(): #redesign this function name = input() print("Welcome,"+name) welcome_message()
19th Nov 2021, 8:38 PM
Lovro Pokrajcic
Lovro Pokrajcic - avatar
+ 2
You just need to include the call statement (welcome_message())to your code
20th Nov 2021, 7:30 AM
Ochola Mark Joshua
Ochola Mark Joshua - avatar
+ 2
def welcome_message(): #redesign this function name = input() print("Welcome,"+name) welcome_message() ================================== OR def welcome_message(name): print("welcome", name) #call function with argument name= input() welcome_message(name)
21st Nov 2021, 7:40 AM
Kisirinya Bonny
Kisirinya Bonny - avatar
+ 1
Instead of print("Welcome,"+name) You can use print(f"Welcome {name}")
21st Nov 2021, 5:10 PM
Desert_fox
Desert_fox - avatar
0
i do not know how to call it I have tried but I don't understand how
19th Nov 2021, 5:57 PM
Jackson Jameson
Jackson Jameson - avatar
0
def welcome_message(): #redesign this function name = input() return f"Welcome, {name}" print(welcome_message()) This should pretty much solve the task. Your code isn't wrong, the only problem is that you did not call your function after creating it. N/B in order for your function to work, you have to call it
21st Nov 2021, 6:15 AM
Walter
Walter - avatar
0
username=input("please input your name") print(f'welcome {username}')
21st Nov 2021, 10:18 AM
M.azeem
M.azeem - avatar
0
Maynul ,when we make a big program putting (,) or (+) to connected the strings. the (,) or (+) become a night Mayor so i am tell you the smart way to do that. thank you.
21st Nov 2021, 6:51 PM
M.azeem
M.azeem - avatar