Python Lab Experiments
Python Lab Experiments
Lab Exercises
b) Using a for loop, write a program that prints the decimal equivalents of 1/2, 1/3,
1/4 ,....... 1/10
e) Write a program using a while loop that asks the user for a number, and prints a
countdown from that number to zero.
a) Write a program that takes 2 numbers as command line arguments and prints its
sum.
b) Implement python script to show the usage of various operators available in python
language.
c) Implement python script to read person’s age from keyboard and display whether
he is eligible for voting or not.
d) Implement python script to check the given year is leap year or not.
c) Implement python script to accept line of text and find the number of characters,
number of vowels and number of blank spaces in it.
b) Write a program which makes use of function to display all such numbers which
are divisible by 7 but are not a multiple of 5, between 1000 and 2000.
b) With a given tuple (1, 2, 3, 4, 5, 6, 7, 8, 9, 10), write a program to print the first half
values in one line and the last half values in one line.
IX. Exercise programs on files.
b) Write Python script to copy file contents from one file to another.
a) Implement a python script to check the element is in the list or not by using Linear
search & Binary search.
b) Implement a python script to arrange the elements in sorted order using Bubble,
Selection, Insertion and Merge sorting techniques.