Python Classroom notes 23/Aug/2024

Programming

  • Goals:
    • We need to learn automation of anything (operations and infrastructure)
    • Cloud Native Applications
      • PaaS (Platform as a service)
      • FaaS (Functions as a service)/Serverless
    • Foundations for Generative AI Application Development
  • Steps:
    • Understand Programing in a conceptual way
    • Debugging
    • Python

Meet Flora

  • Selfie

Approach

  • We need to understand what flora knows
  • We need to get our job done by conveying our problem to the standard of flora

What flora knows

  • Selfie
  • Flora executes instructions line by line
  • Flora remembers anything with an alias
Remember 10 as number
or
number = 10
  • Flora knows basic arthimetic
+
-
*
/  10/3 = 3
% remainder 10%3 == 1
  • Flora knows comparisions
<
<=
==
>
>=

What is Simple Interest?

Simple interest is a method of calculating the interest earned or paid on a loan or investment. It is calculated as a percentage of the principal amount (the original sum of money) for each period of time that the money is borrowed or invested. The key characteristics of simple interest are:

  • Interest is calculated only on the principal amount, not on any previously earned interest
  • The interest rate remains constant throughout the loan or investment period
  • The interest is calculated for the exact time period the money is borrowed or invested

How to Calculate Simple Interest

Simple Interest (I) = (Principal amount (P) × Rate of interest (R) × Time (T)) / 100

Where:
P is the principal amount (the original sum of money)
R is the annual interest rate (as a percentage)
T is the time period (in years)

For example, if you borrow $10,000 at 5% interest for 3 years, the simple interest would be:

I = (10,000 × 5 × 3) / 100 = $1,500

The total amount you would repay is the principal plus the interest:

Total amount = Principal + Interest
= $10,000 + $1,500
= $11,500

Key Differences Between Simple and Compound Interest

The main differences between simple and compound interest are:

  • Simple interest is calculated only on the principal amount, while compound interest is calculated on the principal plus any previously earned interest
  • The interest rate remains constant in simple interest, but can vary in compound interest
  • Simple interest is calculated for the exact time period, while compound interest is calculated for each compounding period (e.g. monthly, quarterly, annually)

In general, compound interest results in higher total interest earned or paid compared to simple interest over the same time period[1][2][4].

Citations:
[1] https://cleartax.in/s/simple-compound-interest-calculator
[2] https://byjus.com/maths/simple-interest/
[3] https://study.com/academy/lesson/how-to-find-simple-interest-rate-definition-formula-examples.html
[4] https://www.idfcfirstbank.com/finfirst-blogs/personal-loan/what-is-simple-interest
[5] https://www.calculator.net/simple-interest-calculator.html
[6] https://www.investopedia.com/terms/s/simple_interest.asp
[7] https://byjus.com/simple-interest-formula/
[8] https://groww.in/calculators/simple-interest-calculator

Problem 1: Lets make flora calculate simple intrest

  • Instructions
Hi Flora
Remember 10000 as principal
Remember 18 as rate
Remember 2 as time
Calculate principal * rate * time /100 and remember as result
say/display result

Problem 2: Lets make flora solve the following problem

  • Samples
9999 => 9+9+9+0 => 36 => 3+6 => 9
353 => 2
9991 => 1


  • Lets solve for two digits
Hi Flora
Rememeber 45 as number
calculate number%10 and store in result
caculate number/10 and store in number
calculate number %10 and add it to result
say result
  • Lets solve higher digits tomorrow

Exercise

  • Make flora to find if the number is even or not
  • Make flora to calculate cube of a number
  • Try to findout what process in a operating system is
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%