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

Python Programming Questions Guide

The document outlines a comprehensive list of Python programming exercises categorized into various topics such as Basics, If-Else, Loops, Lists, Tuples, Dictionaries, Sets, Strings, Functions, and Recursion. Each category contains specific programs to implement fundamental concepts and operations in Python. This serves as a structured guide for learners to practice and enhance their Python programming skills.

Uploaded by

codexwrite15
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)
6 views3 pages

Python Programming Questions Guide

The document outlines a comprehensive list of Python programming exercises categorized into various topics such as Basics, If-Else, Loops, Lists, Tuples, Dictionaries, Sets, Strings, Functions, and Recursion. Each category contains specific programs to implement fundamental concepts and operations in Python. This serves as a structured guide for learners to practice and enhance their Python programming skills.

Uploaded by

codexwrite15
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

Python Questions

1.​ Basics
1.1.​ Program to perform arithmetic operation (+, -, *, /).
1.2.​ Program to Calculate Fahrenheit to Celsius.
1.3.​ Program to find the simple Interest and compound Interest.
1.4.​ Program to Swap two numbers.
2.​ If else
2.1.​ Program to Check Leap Year.
2.2.​ Program to Check Whether a Number is Positive, Negative, or Zero.
2.3.​ Program to Check Whether a Character is Vowel or Consonant.
2.4.​ Program to distribute a grade to students through given marks.
3.​ Match Case
3.1.​ Program to print print days of the week and month of years.
3.2.​ Program to Make a Simple Calculator
4.​ Loops
4.1.​ While loop
4.1.1.​ Program to print numbers in reverse order.
4.1.2.​ Program to find the reverse of the given number (e.g. 123
output = 321).
4.1.3.​ Program to Calculate Sum of Natural Numbers.
4.1.4.​ Program to Print fibonacci series.
4.1.5.​ Program to Check Armstrong Number
4.2.​ For loop
4.2.1.​ Program to print numbers in reverse order.
4.2.2.​ Program to Check Armstrong Number from 1 to N
4.2.3.​ Program to Check prime Number from 1 to N.
4.2.4.​ Program to simple pyramid pattern
4.2.5.​ Program to diamond pattern.
5.​ List
5.1.​ Program to find sum and Average of Array.
5.2.​ Program to find the maximum and minimum value in an Array.
5.3.​ Program to sort Array in ascending and descending order.
5.4.​ Program to search Element from an Array and return the index.
5.5.​ Program to Find Common Array Elements
5.6.​ Find the Size of a List in Python
6.​ Nested List
6.1.​ Program to print Matrix.
6.2.​ Program to Check Whether Two Matrices Are Equal or Not
6.3.​ Program to find sum of rows and sum of column of matrix
6.4.​ Program to Print Diagonals of a Matrix
7.​ Tuple
7.1.​ Create a list of tuples from a given list having a number and its cube
in each tuple(list = [2,3,1,4,5]).
7.2.​ Flatten tuple of List to tuple.
7.3.​ Convert Nested Tuple to Custom Key Dictionary
8.​ Dictionaries
8.1.​ Extract Unique values dictionary values
8.2.​ Merging two Dictionaries
8.3.​ Convert key-values list to flat dictionary
9.​ Sets
10.​ Strings
10.1.​ Check if a string is palindrome or not
10.2.​ Check if a Substring is Present in a Given String
10.3.​ Remove all duplicates from a given string
10.4.​ Reverse the collection of words (e.g. Mary wants to go school.
Output = school go to wants Mary)
11.​ Functions
11.1.​ Function type - 1 no argument no return
11.1.1.​ Program to Print Hollow Star triangle pattern
11.1.2.​ Program to Calculate the Sum and Average of All the
Elements Present in a Tuple
11.2.​ Function type - 2 with argument with return
11.2.1.​ Program to Check Whether a Number is Prime or Not.
11.2.2.​ Program to Find the Maximum and Minimum value in a list,
tuple, dictionary.
11.3.​ Function type - 3 with argument no return
11.3.1.​ Program to Sort an Array in Ascending and Descending
order
11.3.2.​ Program to Print Fibonacci Series.
11.4.​ Function type - 4 no argument with return
11.4.1.​ Program to return the P.I. value and calculate the area of
the circle.
11.4.2.​ Program to return the Gravity value and calculate the
Basic Gravitation (Fg​=m*g).
11.5.​ Lambda function
11.5.1.​ Check if a number is positive, negative, or zero.
11.5.2.​ Check if a number is even or odd.
12.​ Recursion
12.1.​ Program to calculate factorial.
12.2.​ Program to calculate sum of numbers.
12.3.​ Program to print fibonacci series.

You might also like