Python: Repay Loans (Gr. 9-10)
In this lesson, students are introduced to loops in Python through the Loan Payment Calculator application. The for loop is used to repeat an action or sequence a specified number of times. Take the even principal payment as an example, students will explore how to use the for loop to help calculate the repayments of a loan in the even principal payment schedule.
- Using For loops in Python
- Learn how to use the range() function in conjunction with for loops
- Concatenating strings, integers, and floats inside a print() statement
Curriculum Connections Summary
- Ontario - Mathematics & Computer Science
- Quebec - Coming Soon!
- New Brunswick - Coming Soon!
- Nova Scotia - Coming Soon!
- Alberta - Coming Soon!
- British Columbia - Coming Soon!
- Manitoba - Coming Soon!
- Prince Edward Island - Coming Soon!
- Saskatchewan - Coming Soon!
- Newfoundland & Labrador - Coming Soon!
- Yukon Territories - Follow's B.C.'s Curriculum
- Northwest Territories - Follows Alberta's Curriculum
- Nunavut - Follows Alberta's Curriculum
Find Out More
mBlock and Python Coding - The Programming Language of the Future
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. With mBlock, Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form.