Python - ICT Practical Practice
Python - ICT Practical Practice
PROGRAM 1
A code for checking whether the number entered the user is in the sequence or not.
Output: False
PROGRAM 3
A code for printing all terms in the range using for loop.
Output: 2,4,6,8,10
PROGRAM 4
A code for printing the factorial of any number entered by the user.
Output: number: 6 Factorial: 720
PROGRAM 9
A code for printing the Fibonacci series of any number entered by the user.
Output: number: 7 Series: 0+1=1, 1+1=2, 2+3=5, 3+5=8, 5+8=13 and 8+13=21.
PROGRAM 10
A code for printing the first 10 natural numbers using while loop.
Output: Numbers from 1 to 10.
PROGRAM 11
A code for printing the square numbers from 10 to 20 using while loop.
Output: Squares of numbers 10-19.
PROGRAM 12
A code for printing the multiples of 3 and their sum in the range 10 to 30
using while loop.
Output: Multiples of 3 from 10 to 30 and their sum.
PROGRAM 13
A code for printing the table of any number given by the user using
while loop.
Output: Table of any number.
PROGRAM 14
A code for finding the sum of even numbers using for loop.
Note: The number till 18 have been added as in the range the last value is 20-1=19.
PRACTICE
A code for finding the sum of even numbers using while loop.
Note: The numbers till 20 have been added as in the condition I is less than or equal to 20.
PRACTICE
A code for checking if any number entered by the user is a multiple of 5 or not using the
remainder.
PRACTICE
A code for printing the first 10 natural numbers with for and while loop
PRACTICE
A code for printing the sum of the first 10 natural numbers with for and while loop
PRACTICE
A code for printing the table of 3 using for and while loop.
Thank you!
For your guidance and support ma’am.