Print a small name card for a student.
What to build
Two lines of output. The line that reads the input is already written for you, and the lesson on input explains how it works.
Requirements
- Print
Name:followed by the student's name. - Print
Course: CSE 101on the second line.
Input
One line: a name.
Output
Two lines, as in the example.
Constraints
The name has at least one character.
Example
Input:
Rahim
Output:
Name: Rahim
Course: CSE 101
Why it works
print puts a space between the values it is given, so the label and the name need no extra spaces of their own.
Examples
Example 1 · Input
Rahim
Expected output
Name: Rahim Course: CSE 101
Example 2 · Input
Nadia
Expected output
Name: Nadia Course: CSE 101
Prompts inside input() are ignored when checking, so input("n: ") is fine.
Hints
Hint 1
The first line is written for you. It stores what was typed in the variable name.
Hint 2
print("Name:", name) puts one space between the two values.
Solution
Show one correct solution (try it yourself first)
name = input()
print("Name:", name)
print("Course: CSE 101")