135k views
2 votes
1.16 LAB: Input: Welcome message Write a program that takes a first name as the input, and outputs a welcome message to that name. Ex: If the input is Pat, the output is:

1 Answer

0 votes

Answer:

Following are the program to this question:

val=input("")#defining val variable that inputs value

print('Hello',val,', we welcome you...')#defining print method, that print input value with the message

Output:

Pat

Hello Pat , we welcome you...

Explanation:

In the above given, python code a "val" variable, and the print that is inbuilt method is declared, inside the "val" variable the input method is used, which is used to input the value from the user side.

In the next line, the print method has declared, which is used to print the value with the message.

User Joshua Clark
by
4.5k points