note.py

Day 1 — Python Practice

Every Python journey starts with one line of code. Follow my 10-day journey from zero to building small programs. Clear lessons. Daily practice. One step closer with every project.

article = {published

Day 1 — Python Practice

Use only variables, print, and the data types str, int, and float. Try each exercise before asking for the answer.

Exercise 1 — Print text

Print your name and this sentence on two separate lines:

I am learning Python.

Hint: Put text inside quotation marks.

Exercise 2 — Create a variable

Create a variable called city. Give it the name of your city, then print its value.

Hint: Do not put the variable name inside quotation marks when printing its value.

Exercise 3 — Use three data types

Create these variables:

  • name: your name as a string.
  • age: your age as an integer.
  • study_hours: your daily study hours as a float.

Print each value with a clear label, such as Name:.

Exercise 4 — Change a value

Create a variable called goal and print its value. Then give the same variable a new value and print it again.

Hint: Python runs these instructions from top to bottom.

Exercise 5 — Find and fix two mistakes

This code should print the job. Find and correct its two mistakes:

job = SEO Managerprint(Job)

Hint: Check the quotation marks and capital letters.

Mini-project — Introduce yourself

Create a file called about_me.py. Use these six variables:

VariableInformationData type
nameYour namestr
cityYour citystr
jobYour jobstr
ageYour ageint
daily_study_hoursYour daily study hoursfloat
goalYour learning goalstr

Print all six values with clear labels. Then change your city and study hours, save the file, and run it again.

Success criteria: Your program runs without errors, displays all six values, and shows the new values after you change them.

}
reply.py

Leave a Reply

Your email address will not be published. Required fields are marked *