Python - List of Experiments
Python - List of Experiments
Tech II Semester
PYTHON PROGRAMMING Lab
Lab External Examination Question Paper
Experiment1
Experiment 2
a) Write a program to compute distance between two points taking input from
the user (Pythagorean Theorem).
b) Write a program add.py that takes 2 numbers as command line arguments and
prints its sum.
Experiment 3
a) Write a Program for checking whether the given number is a even number or
not.
b) Using a for loop, write a program that prints out the d ecimal equivalents of
1/2,1/3,1/4,...,1/10.
Experiment 4
a) Write a program using a for loop that loops over a sequence. What is
sequence?
b) Write a program using a while loop th at asks the user for a number, and
prints a count down from that number to zero.
Experiment 5
a) Find the sum of all the primes below two million. E ach new term in the
Fibonacci sequence is generated by adding the previous two terms. By starting
with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
b) By considering the terms in the Fibonacci sequence whose values do not
exceed four million, find the sum of the even-valued terms.
Experiment 6
a) Write a program to count the numbers of characters in the string and store
them in a dictionary data structure.
b) Write a program to use split and join methods in the st ring and trace a birth
day with a dictionary data structure.
Experiment 7
Experiment 8
Experiment 9
Experiment 11
Experiment 12
Class variables and instance variable and illustration of the self variable
i) Robot.
ii) ATM Machine.
Experiment - 13