Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
1 views

Pythonlab Questions 1

The document outlines a series of programming experiments focused on various tasks such as finding common values between arrays, computing GCD, checking even numbers, and implementing basic data structures and algorithms. Each experiment includes specific programming challenges like calculating prime numbers, creating a simple calculator, and demonstrating Python's data types. The experiments cover a wide range of topics, including loops, functions, and basic logic operations.

Uploaded by

maaridhanush59
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Pythonlab Questions 1

The document outlines a series of programming experiments focused on various tasks such as finding common values between arrays, computing GCD, checking even numbers, and implementing basic data structures and algorithms. Each experiment includes specific programming challenges like calculating prime numbers, creating a simple calculator, and demonstrating Python's data types. The experiments cover a wide range of topics, including loops, functions, and basic logic operations.

Uploaded by

maaridhanush59
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment 1.

Write a program to find common values between two arrays.

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.

Write a program combine_lists into a dictionary.

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.

Write a program to print the Fibonacci sequence using while loop.

Experiment 5.

Write a program to convert a list and tuple into arrays.

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.

Write a function “dups” to find all duplicates in the list.

Experiment 7.

Write a simple calculator program by making use of functions

Write a function “unique” to find all the unique elements of a list.

Experiment 8.

Write a function “cumulative_product” to compute cumulative product of a list of numbers.

Write a program to check whether a string is palindrome or not.


Experiment 9.

Write function to compute GCD and LCM of two numbers. Each function should not exceed one
line.

Write a program to implement Full Adder.

Experiment 10.

Write a program to implement Digital Logic Gates – AND, OR, NOT.

Find the factorial of a number using recursion.

Experiment 11.

Write a program to demonstrate basic data type in python.


Write a program add.py that takes 2 numbers as command line arguments and perform their sum.

Experiment 12.

Write a program to demonstrate list and tuple in python.

Write a program to implement Parallel Adder.

Experiment 13.

Write a program to count the numbers of characters in the string and store them in a dictionary
data structure.

Write a program to split and join a string.

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 program to check the given year is leap year or not.

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 to find the largest number from a list of numbers.


Experiment 17.

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.

Write a program to check whether a string starts with specified characters.

Experiment 18.

Write a program to find the smallest number from a list of numbers.

Write a program to print all prime numbers in a given interval (use break).

You might also like