AssignmentsWeek 01 · FoundationsPersonal introduction paragraph
wk01.p6Practice exerciseWeek 01 · FoundationsOpen · due in week 1

Personal introduction paragraph

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.

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.

  1. Ask the user for their name, field of study, target country, and target start year — one input() per question.
  2. Convert the start year into an integer with int().
  3. 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).
  4. 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 answers

How we'll grade it

Four checks, four points. Three or above is passing — we'll ask you to revise anything we can't tick.

CheckWhat we look forPt
It runsAsks all four questions in order, then prints the paragraph.1
Uses int() correctlyYear is converted to int before being used in the subtraction.1
Math is rightThe 'years from now' number equals the start year minus 2026.1
Readable outputLines flow like a real introduction, not a debug dump.1
Ready?
Hand it in
You can submit a draft and revise later if you're not done.
Begin submission →