CSE 110: Introduction to Programming

W01 Code-along Activity: ID Badge Generator

Code-along Activity Overview

For this activity, you will code along with an instructor video that walks you through each step of the activity below. Make sure that you pause the video, or watch sections over if you need to, so that you are able to complete the entire activity.

Your instructor will post a link to the video in Microsoft Teams.

Overview

An ID badge, such as a drivers license or student ID, contains personal details that are formatted in a very specific way.

For this activity you will write a program that will create a properly formatted ID badge.

Program Requirements

Write a program to prompt the user for the following:

Then you should display the information back in this format:

Note that the square brackets [] indicate a value coming from the user and should not be displayed.


----------------------------------------
[LAST NAME], [first name]
[Job title]
ID: [id number]

[email address]
[phone number]
----------------------------------------

In addition to the spacing and punctuation shown above, you must implement the following requirements:

An example of the program running is shown:


Please enter the following information:

First name: Jane
Last name: Doe
Email address: JaneDoe@email.com
Phone number: (208) 555-1234
Job title: chief software architect
ID Number: 83-23821

The ID Card is:
----------------------------------------
DOE, Jane
Chief Software Architect
ID: 83-23821

janedoe@email.com
(208) 555-1234
----------------------------------------

Instructions

Find the video that your instructor has posted for this assignment and code along with them for each of the following steps.

Please work through the requirements in order with the instructor rather than jumping ahead to more complicated steps, to ensure that you are understanding the fundamental concepts.

Sample Solution

In addition to the instructor video, you can also view this sample solution. (This solution may be slightly different than the final code that you and your instructor created.)

Alternative Video Link

In addition to the link that your instructor posted, you are also welcome to watch the following code walkthrough or use its transcript:

Submission

Please pause and re-watch any sections of the instructor video necessary until you have completed the entire activity and your program runs the same as the instructor's. When you are finished:

Up Next

Other Links: