Week 2 Tasks

Task 5

WAP to calculate the area of square.

Hint: $$ Area = Side^2 $$

Task 6 (Experiment 2)

WAP to calculate the simple interest taking principal,rate of interest and no. of years as inputs from user.

Hint: $$ SI = \frac{(Principal * ROI * Years)}{100} $$

Task 7 (Experiment 3)

WAP to calculate the sum and average of three numbers.

Hint: $$ Average = \frac{(NUM1 + NUM2 + NUM3)}{3} $$

Task 8 (Experiment 4)

WAP to calculate perimeter and area of a circle with the help of constants.

Hint:
$$ Perimeter = 2\pi r $$ $$ Area = \pi r^2 $$

Task 9 : (Bonus Task)

WAP to calculate the resistance required (R) to be connected in series with the LED to protect it from blowing up when Voltage (V) is applied.

Hint: Max current that can be handled by LED is 20mA and Voltage Drop by LED is 3V. Use ohm's Law & KVL to find a relation between V and R. ”