Functions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Functions

We have a function that outputs "Welcome, user" as it is called. We want to make it more personalized, so redesign the given function so that it will take the name of the user as input and output the welcome message with it. Sample Input Tommy Sample Output Welcome, Tommy

9th Sep 2022, 8:57 PM
Tochukwu Onyebueke
5 Answers
+ 2
Hi! Not Print. It needs print Print --->>> print
9th Sep 2022, 9:14 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Tochukwu Onyebueke a few errors and unnecessaries Name = input() # by default input() is string unless int or float eg int(input()) def Welcome(): print should be lowercased print("Welcome "+Name) Welcome() Try those corrections and see if that helps.
9th Sep 2022, 11:51 PM
BroFar
BroFar - avatar
12th Sep 2022, 4:13 PM
Tochukwu Onyebueke
0
Here goes my code; Name = str(input()) def Welcome(): Print("Welcome," + Name) Welcome () I ran this code on the playground and it worked but somehow I am still stuck at lesson 37.1
9th Sep 2022, 9:00 PM
Tochukwu Onyebueke
0
BroFar I'm still stuck there...
12th Sep 2022, 4:21 PM
Tochukwu Onyebueke