ICT Lab Report
ICT Lab Report
ENGINEERING
COLLEGE OF E&ME, NUST, RAWALPINDI
LAB NO. 2
APPLICATIONS OF ICT
INTRODUCTION TO CONDITIONAL STATEMENTS AND LOGICAL OPERATIONS IN PYTHON.
SUBMITTED BY:
➢ SALMAN AHMAD KHAN
➢ M. MOBEEN ZAFAR
➢ AREESHA NAEEM
SUBMITTED TO:
➢ DR ASAD MANSOOR
SUMISSION DATE:
06/10/2024
Degree/ Syndicate: CE-45-B
TOPIC
Condition Nesting And Looping.
OBJECTIVES:
• To have the understandings of basic syntax of python loops.
• introduction to the while loop.
HARDWARE/SOFTWARE USED:
Hardware: PC
Software: IDLE 3.12
TASKS:
Different tasks were assigned to grasp better understanding of the
above-mentioned. These tasks are as follows:
TASK:1:
PSEUDO CODE:
Start.
Taking input from the user for the required table number and saving it in the
variable table.
Show n*x.
Flow chart:
Input:
Task 2:
• A person invests $𝟏𝟎𝟎𝟎 in a savings account yielding 𝟓% interest. Assuming that all
interest is left on deposit in the account, calculate and print the amount of money in the
account at the end of each year for 𝟏𝟎 years. Use the following formula for determining
these amounts:
𝑎=𝑝1+𝑟𝑛
• Where:
Output:
Task 3:
Write a program to check whether a number is Armstrong or not. (Armstrong number is a
number that is equal to the sum of cubes of its digits for example : 153 = 1^3 + 5^3 + 3^3).
Input:
Output:
Conclusion:
Basic python looping syntax was learnt during the lab in the third week. We
were introduced to a python loop called while loop in which you have to enter
a condition and the loop keeps on running unless the true result is gained.
Basic programs were created using while loop i.e.
Number table.
Calculating the interest for a specific amount with the specific percentage
for a number of years.