+ 3

Trying to solve welcome, solo learner! In python core

My code keeps outputting welcome, user instead of welcome , and the input def welcome_message(): #redesign this function user= input() print("Welcome, user") welcome_message()

6th Apr 2021, 9:29 AM
Simisola Osinowo
Simisola Osinowo - avatar
25 Réponses
+ 12
You have made a little mistake with the syntax. Replace the line of print with print ("Welcome",user) instead of print("Welcome,user")
6th Apr 2021, 9:32 AM
Aditya
Aditya - avatar
+ 12
This works def welcome_message(): name = input() print("Welcome,",name) welcome_message() The double commas tripped me up.
10th Jan 2022, 1:51 PM
Josh
Josh - avatar
+ 6
Very welcome!
6th Apr 2021, 9:59 AM
Aditya
Aditya - avatar
+ 2
def welcome_message(): user_name = input() print("Welcome, " ,user_name) or (Welcome, " + user_name) welcome_message() def this_does_not _work(Why?): Your_answer = input() Print(your _anser) # Please
15th Dec 2021, 4:36 AM
Ali Simsek
+ 2
def welcome(): #redesign this function user= input() print("Welcome,", user) welcome()
17th May 2022, 7:26 AM
Najwan Najmussabah
+ 1
def welcome(): #redesign this function user= input() print("Welcome,", user) welcome()
17th Sep 2021, 2:42 AM
Geo
+ 1
def welcome(): user=input() print("Welcome"+',', user) welcome()
27th Jan 2022, 1:31 PM
Tsvata Berdzenishvili
+ 1
def welcome(): user=input() print("Welcome"+',', user) welcome() that is the correct answer. the user inside the print should match the user before the input
4th Nov 2022, 2:59 PM
Daniel Kulimushi
Daniel Kulimushi - avatar
+ 1
def welcome(): user=input() print("Welcome,",user) welcome()
3rd Feb 2023, 11:32 AM
D M S Dhananjaya S22010043 522514419
D M S Dhananjaya S22010043 522514419 - avatar
+ 1
int[] x = {3, 2, 1}; System.out.println(x.length);
7th Apr 2023, 5:42 AM
KAARTHIKEYAN T.P
KAARTHIKEYAN T.P - avatar
0
Thanks
6th Apr 2021, 9:54 AM
Simisola Osinowo
Simisola Osinowo - avatar
0
I am a little lost, My code def welcome_message(): #redesign this function name = input() print("Welcome,"+ name) welcome_message() When I ran, it's ok. But it's not the correct answer. What I am doing wrong? Thank you
30th Oct 2021, 11:08 AM
Mar
Mar - avatar
0
def welcome_message(): name = input() print("Welcome,",name) welcome_message()
31st Mar 2022, 9:52 PM
Abdelkhalek Nael Ahmad Allan
Abdelkhalek Nael Ahmad Allan - avatar
0
I couldn’t solve this issue even try several times. I have applied all solutions which had been posted here but none of them worked. Surprisingly i applied Constantine Tvalashvili's solution and succeeded . Thanks a lot Constantine 🙏🏻. def welcome_message(name): #redesign this function return "Welcome, " + name print(welcome_message(input()))
16th Apr 2022, 6:31 PM
Krupesh Rajendrakumar Desai
0
I have tried this and it works def welcome_message(user): user = input() print("Welcome, "+ user) welcome_message("Bob")
14th Jul 2022, 8:10 AM
Buddana Lakshmi Sahitaa
0
name = input() def message(): print("welcome " + name) message ()
8th Aug 2022, 1:17 PM
Bethel Tetteh
Bethel Tetteh - avatar
0
name = input() print("Welcome, " + name
30th Nov 2022, 8:45 AM
Lakkars Nithin
Lakkars Nithin - avatar
0
1) def welcome_message(): #redesign this function name = input() print("Welcome,",name) welcome_message() 2) def welcome_message(): #redesign this function name = input() print("Welcome, " + name) welcome_message()
16th Apr 2023, 1:35 PM
AMINE MOUTAOUAKKIL
0
Answer
2nd Jan 2024, 4:30 PM
Sai Deepak Boddepalli
Sai Deepak Boddepalli - avatar
0
def welcome_message(): name = input() print("Welcome,",name) welcome_message()
4th Jan 2024, 3:09 AM
Harshani Madushani
Harshani Madushani - avatar