Pythonlab Questions 1
Pythonlab Questions 1
Write a program to compute GCD of two numbers by taking input from the user.
Experiment 2.
Write a program for checking whether the given number is an even number or not.
Experiment 3.
Write a program using a for loop that loops over a sequence. What is sequence?
Write a program using a while loop that asks the user for a number and prints a countdown from
that number to zero.
Experiment 4.
Write a program to find the sum of all the primes below two million.
Experiment 5.
Write a program to find mean, median, mode for the given set of numbers in a list.
Experiment 6.
Write a program to count the numbers of characters in the string and store them in a dictionary
data structure.
Experiment 7.
Experiment 8.
Write function to compute GCD and LCM of two numbers. Each function should not exceed one
line.
Experiment 10.
Experiment 11.
Experiment 12.
Experiment 13.
Write a program to count the numbers of characters in the string and store them in a dictionary
data structure.
Experiment 14.
Implement python script to show the usage of various operators available in python language.
Write a program to read person’s age from keyboard and display whether he/she is eligible for
voting or not.
Experiment 15.
Write a function “reverse” to print the given list in the reverse order
Experiment 16.
Write a program to find the sum and average of given numbers using lists.
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.
Experiment 18.
Write a program to print all prime numbers in a given interval (use break).