What you'll build
Ask four short questions and print a clean five-line introduction. Pure input, variables, and printing with commas — no conversions, no math.
Requirements
The must-do parts. If any are missing, we'll ask you to take another pass.
- Ask the user for their name, country, field of study, and one hobby outside school — one
input()per question, each stored in its own variable. - Print five lines of output: a header line, then one line each for the name, country, field, and hobby.
- Use commas inside
print()to combine each label with its variable. Python adds the space between them. - All four answers are text. You do not need to convert anything to a number.
Bonus, if you're feeling brave
- Add a fifth question — a country they'd like to apply to study in — and one more line in the output.
- Combine two variables in a single
printline, likeprint(name, "from", country).
Examples
What your program should look like when it runs. Lines starting with $ are typed by you; the rest is your program.
Example cell run
Your name: Amara
Your country: Ghana
Field of study: Public Health
One hobby outside school: long-distance running
Meet a new study group member.
Name: Amara
From: Ghana
Studies: Public Health
Outside school, enjoys: long-distance runningWhere to start
Copy this scaffold into a new file. You don't have to use it — it's just a friendly nudge.
# Study group introduction
name = input("Your name: ")
country = input("Your country: ")
field = input("Field of study: ")
hobby = input("One hobby outside school: ")
# TODO: print five lines using the four answers
# Hint: use a comma inside print() to join a label with a variableHow we'll grade it
Four checks, four points. Three or above is passing — we'll ask you to revise anything we can't tick.
| Check | What we look for | Pt |
|---|---|---|
| It runs | Starts cleanly. Asks all four questions in order. | 1 |
| Uses inputs | Every printed line uses something the user actually typed. | 1 |
| Commas in print | At least one `print()` call uses a comma to join a label with a variable. | 1 |
| Readable output | Five clearly labelled lines. No walls of text glued together. | 1 |