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

Programs For Practical FIle

The document outlines a series of programming tasks that involve basic operations such as finding the largest and smallest numbers, checking for perfect and prime numbers, generating Fibonacci series, and manipulating strings and lists. It also includes file handling tasks like reading, writing, and processing text and binary files, as well as creating and searching through CSV files. Additionally, it covers implementing data structures like stacks and generating random numbers.

Uploaded by

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

Programs For Practical FIle

The document outlines a series of programming tasks that involve basic operations such as finding the largest and smallest numbers, checking for perfect and prime numbers, generating Fibonacci series, and manipulating strings and lists. It also includes file handling tasks like reading, writing, and processing text and binary files, as well as creating and searching through CSV files. Additionally, it covers implementing data structures like stacks and generating random numbers.

Uploaded by

cool ritz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Input three numbers and display the largest / smallest number.

2. Determine whether a number is a perfect number, an Armstrong


number, prime or composite number or a palindrome.
3. Input a number and check if the number is a prime or composite
number.
4. Display the terms of a Fibonacci series.
5. Compute the greatest common divisor and least common multiple of
two integers.
6. Count and display the number of vowels, consonants, uppercase,
lowercase characters in string.
7. Input a string and determine whether it is a palindrome or not; convert
the case of characters in a string.
8. Input a list of numbers and swap elements at the even location with the
elements at the odd location.
9. Input a list/tuple of elements, search for a given element in the
list/tuple.
10. Create a dictionary with the roll number, name and marks of n students
in a class and display the names of students who have marks above 75.
11.Generate the following patterns using nested loops:

12.Write a program to input the value of x and n and print the sum of the
following series:
13. Read a text file line by line and display each word separated by a #.
14. Read a text file and display the number of
vowels/consonants/uppercase/lowercase characters in the file.
15. Remove all the lines that contain the character 'a' in a file and write it to
another file.
16.Create a binary file with name and roll number. Search for a given roll
number and display the name, if not found display appropriate message.
17. Create a binary file with roll number, name and marks. Input a roll
number and update the marks.
18.Write a random number generator that generates random numbers
between 1 and 6 (simulates a dice).
19.Write a Python program to implement a stack using list.
20. Create a CSV file by entering user-id and password, read and search the
password for given userid.

You might also like