What you'll build
Build the introduction paragraph from class — name, field, country, target start year. The year is text from input(), so you'll need int() to do a small bit of math at the end.
Requirements
The must-do parts. If any are missing, we'll ask you to take another pass.
- Ask the user for their name, field of study, target country, and target start year — one
input()per question. - Convert the start year into an integer with
int(). - Print four lines: a greeting using the name, a sentence about the field and country, the start year on its own line, and a final line saying how many years from now that is (use
year - 2026). - Use commas inside
print()to combine sentence parts with the variables.
Bonus, if you're feeling brave
- Combine the field and country into a single fluid sentence (e.g.
Amara from Ghana applying for Public Health in Canada). - Print one closing line wishing the applicant luck.
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
Field of study: Public Health
Target country: Canada
Target start year: 2027
Hello, my name is Amara.
I am applying to study Public Health in Canada.
I plan to begin in 2027.
That is 1 year from now.Where to start
Copy this scaffold into a new file. You don't have to use it — it's just a friendly nudge.
# Personal introduction paragraph
name = input("Your name: ")
field = input("Field of study: ")
country = input("Target country: ")
year_text = input("Target start year: ")
# TODO: convert year_text to an int
# TODO: calculate years_from_now using 2026 as today's year
# TODO: print four lines using all four answersHow 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 | Asks all four questions in order, then prints the paragraph. | 1 |
| Uses int() correctly | Year is converted to int before being used in the subtraction. | 1 |
| Math is right | The 'years from now' number equals the start year minus 2026. | 1 |
| Readable output | Lines flow like a real introduction, not a debug dump. | 1 |