0% found this document useful (0 votes)
1 views2 pages

LAB FILE Py Questions

The document contains a list of 30 Python programming tasks, each requiring the implementation of specific functionalities such as finding the largest number, counting vowels, and generating patterns. Each task emphasizes different programming concepts including loops, conditionals, string manipulation, and mathematical calculations. The tasks are designed to enhance coding skills and understanding of Python programming.

Uploaded by

unknownemail0107
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

LAB FILE Py Questions

The document contains a list of 30 Python programming tasks, each requiring the implementation of specific functionalities such as finding the largest number, counting vowels, and generating patterns. Each task emphasizes different programming concepts including loops, conditionals, string manipulation, and mathematical calculations. The tasks are designed to enhance coding skills and understanding of Python programming.

Uploaded by

unknownemail0107
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1,2,3,7,9,17,20,22,23,28,29

Q.1 Write a Python program to find the largest of three numbers and check if the largest number is even or odd.

Q.2 Write a Python program to count the number of vowels in a string and reverse the string.

Q.3 Write a Python program to find the factorial of a number and check if it is a prime number.

Q.4 Write a Python program to calculate the area of a circle and the perimeter of the same circle.

Q.5 Write a Python program to generate the multiplication table of a given number, and find the sum of all the
results in the table.

Q.6 Write a Python program to check if a string is a palindrome and contains only alphabetic characters.

Q.7 Write a Python program to convert Celsius to Fahrenheit and check if the temperature is below freezing
point.

Q.8 Write a Python program to create a simple calculator and also find the GCD of two numbers.

Q.9 Write a Python program to find the Fibonacci series up to a given number and check if a number in the
series is even or odd.

Q.10 Write a Python program to count the frequency of words in a string and find the total number of vowels in
the string.

Q.11 Write a Python program to remove duplicates from a list and sort it in ascending order.

Q.12 Write a Python program to find the largest number in a list and also its position (index).

Q.13 Write a Python program to find the number of occurrences of a character in a string and check if the string
contains only digits.

Q.14 Write a Python program to merge two sorted lists into a single sorted list and remove duplicates.

Q.15 Write a Python program to print a pyramid pattern of stars and numbers side by side.

Q.16 Write a Python program to create a scientific calculator that includes basic arithmetic operations along
with square root and power calculations.

Q.17 Write a Python program to find the factorial of a number using recursion and check if the result is even or
odd.

Q.18 Write a Python program to sort a list of numbers in ascending order without using the built-in sort()
function and find the median of the sorted list.

Q.19 Write a Python program to generate a random password and check if it contains at least one uppercase
letter, one lowercase letter, and one digit.

Q.20 Write a Python program to print a pyramid pattern of stars like this:

Q.20
*
***
*****
*******
*********
Q.21 Write a Python program to reverse a string and count the number of digits in it.

Q.22 Write a Python program to check whether a number is an Armstrong number and also find the sum of its
digits.

Q.23 Write a Python program to print the following pattern of numbers:


Q.23

1
12
123
1234

Q.24 Write a Python program to check whether a string is a palindrome and also count the number of spaces in
it.

Q.25 Write a Python program to create a random password generator with uppercase letters, lowercase letters,
digits, and special characters.

Q.26 Write a Python program to count and display the frequency of each word in a given sentence.

Q.27 Write a Python program to check if a string is a valid hexadecimal number.

Q.28 Write a Python program to reverse the elements of a list without using the built-in reverse() function.

Q.29 Write a Python program to check if a string contains only uppercase letters.

Q.30 Write a Python program to find the intersection of two sorted lists without using any built-in functions.

You might also like