Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.06 KB

File metadata and controls

36 lines (27 loc) · 1.06 KB

Workshop 1 - Homework

Topics

  • print() function
  • Data types: str, int, float, bool
  • Variables
  • Math operators: +, -, *, /, //, %, **
  • Comparison operators: ==, !=, >, <, >=, <=

Tasks

Task 1: Variables and Print

Create variables for a person's profile (name, age, height, is_student) and print them using f-strings.

Task 2: Math Operators

Calculate a total price with tax, discount, and bill splitting using math operators.

Task 3: Comparison Operators

Compare temperature values using all comparison operators and print the results.

Task 4: Data Types

Create variables of different types and print their type using type().

Task 5: Simple Calculator

Perform all math operations (+, -, *, /, //, %, **) on two numbers and print results.

How to Submit

  1. Create your own GitHub repository (e.g. python-125-homework)
  2. Complete all tasks in homework.py
  3. Push your work to your GitHub repository
  4. Share the repository link with the instructor

How to Run

python homework.py