19/01/2025
Day 2
I learnt lots of thing and tried out some other functions in Python.
Firstly, I built a program that sum up two digits numbers and prints out the value on the terminal.
To achieve this, I used what I learnt called subscripting - select a particular text in a string.
In programming, counts starts from 0, 1 , 2 ,3 and so on.
Let's assumed I don't know the value of 9 + 9, i can simple get the value using functionality of subscripting, where I can decide which number or text gets printed on the terminal
Pls check out the slide to see for yourself.
Secondly, I learnt how to check if a number is ODD or EVEN number. To achieve this goal, I used the IF and ELSE Condition Statement. We all know what EVEN and ODD numbers are.
Moving on, I learnt the condition statement called ELIF. With the three conditions I have learnt, I built a simple program that check if a person is tall and old enough to play a game, and also how much to pay depending on their age range.
I was introduced to mathematical operators
(+ - * / **) in Python and the hierarchy.
Moving on, I build a BMI calculator. This calculator would require the user to enter their height in cm and their weight in kg.
After that the BMI of the user will be printed in the terminal. It's better way to let users know the status of their body mass and not just printing the figure therefore, I used the IF, ELIF and ELSE condition statement to achieve it.
I'm still working on the final Project
Which is called Tip Calculator. This machine is going to split a bill equally amongst the number of people involved with a particular percentage for each of them...
Also check of the last slide, which is Life in a week calculator 😃😃
Stay tuned!!!