0% found this document useful (1 vote)
3K views

2.16 LAB Input Welcome Message

The document describes a coding lab activity that asks the student to write a program that takes a first name as input and outputs a welcome message to that name. The example input of "Pat" outputs the message "Hello Pat and welcome to CS Online!". The code sample provided takes a user name as input and prints out the welcome message string formatted with that name.

Uploaded by

CHRIS D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
3K views

2.16 LAB Input Welcome Message

The document describes a coding lab activity that asks the student to write a program that takes a first name as input and outputs a welcome message to that name. The example input of "Pat" outputs the message "Hello Pat and welcome to CS Online!". The code sample provided takes a user name as input and prints out the welcome message string formatted with that name.

Uploaded by

CHRIS D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

2.

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:
Hello Pat and welcome to CS Online!
LAB ACTIVITY
2.16.1: LAB: Input: Welcome message
10 / 10

user_name = input()

print ('Hello', user_name, 'and welcome to CS Online!')

You might also like