#L1 E
WAP to print all elements of a list using a for loop.
Take the elements of the list from the user.
For e.g. Input: l = [3,'Hi',67,0,12,0,8]
Output: 3
'Hi'
67
0
12
0
8
#L2 M
WAP to take inputs from user to make a list. Length of the list has to be taken from the user.
Again take one input from user and search it in the list and delete that element, if found.
If not found, print "Element not present".
For e.g. Input: len_list = 5
list = ["a", "b", "y", "e", "p"]
search_element = "g"
Output: "Element not found"
search_element = "e"
Output: ["a", "b", "y", "p"]
#L3 EM
Make a grading system for a school based on the marks of the students using the following criteria.
Marks 0 - 40 : Grade F
41 - 50 : Grade E
51 - 70 : Grade D
71 - 80 : Grade C
81 - 90 : Grade B
91 - 100: Grade A
Continuously take marks as input from the user and print the grade.
The user can enter "Stop" to stop the loop.
#L4 E
WAP to save the cube of all numbers from 1 to a number n in list,
where n is taken as input from the user.
For e.g. Input: 5
Output: [1, 8, 27, 64, 125] #Cube of numbers from 1 to 5 where 5 is the input from the user
#L5 E
WAP to print even numbers in a given range in reverse order.
Take the range from the user as input.
For e.g. Input: start = 3
End = 14
Output: 14, 12, 10, 8, 6, 4
#L6 E
WAP to print odd numbers in a given range in reverse order.
Take the range from the user as input.
For e.g. Input: start = 3
End = 14
Output: 13, 11, 9, 7, 5, 3
#L7 E
WAP to print multiplication table of a number taken as input from the user.
For e.g. Input: 5
Output: 5*1 = 5
5*2 = 10
.
.
.
5*10 = 50
#L8 E
WAP to print the following pattern.
Here number_of_lines = 4. Take n as input from the user
1
1 2
1 2 3
1 2 3 4
#L9 H
Write a program to calculate the sum of series up to n terms for a digit d.
n & d are taken as input from the user.
For example:
Input: n = 5, d = 2
Logic: 2 + 22 + 222 + 2222 + 22222
Output: 24690
#L10 M
WAP that keeps on accepting numbers from the user until the user enters Zero(0) as input.
Display the sum and average of all the numbers.
For example:
Input: 3, 6, 8, 2, 5, Stop
Output: Sum = 24
Average = 4.8
#L11 E
Accept n numbers from the user and display their average. n is input from the user.
For example:
Input: n = 5
Numbers = 3, 6, 2, 9, 0
Output: Average = 4.0
#S1 E
Write a Python program to count the number of each of the characters (character frequency)
in a string input by the user. Ignore the case.
For example: Input: "Python is great"
Output: P = 1, y = 1, t = 2, and so on...
#S2 M
Write a Python program to find the digits which are absent in a given mobile number.
For example: Input : 9354328855
Output: 0167
#S3 M
WAP in python to find average of n numbers taken as input from the user dynamically.
#S4 E
WAP in python that accepts a hyphen-separated sequence of
words as input and prints the words in a hyphen-separated
sequence after sorting them alphabetically.
For e.g. Input: "p-y-t-h-o-n"
Output: ['h', 'n','o', 'p', 't', 'y']
#S5 MH
WAP in python to find the number of vowels, consonants, digits, special
characters and white space characters in a string input by the user.
Example: Input: "Qwerty@123"
output: v = 1, c = 5, d = 3, w = 0, s = 1
#S6 MH
WAP in python to check the strength of the password input by the user based on the following features.
Length minimum of 8 characters (+1 Strength)
Combination of upper case & lower case characters (+1 Strength)
Combination of alphabets & digits (+1 Strength)
Use of Special Characters (+1 Strength)
Example: Input: "Qwerty@123"
Output: Strength = 4
#S7 E
WAP in python to compare two strings and tell the user if both of those strings are same or not.
Ignore their case.
Example: Input String1: "Hello"
Input String2: "hello"
Output: Strings are same
#S8 E
WAP in python to calculate the number of times a character is repeated in a given string.
Take the string and character from the user.
Example: Input String: "Neil Nitin Mukesh"
Input Character: "e"
Output: 2
#S9 E
WAP in python which accepts string from the user and displays only those characters/elements
which are present at an even index.
Example:
Input: "Python"
Output: Pto
#S10 E
WAP in python to capitalize the first letter of the First Name and Surname
where whole name is taken as input from the user.
Example: Input: "first last" or "FIRST LAST" or "first lAst" i.e. Input can be in any case.
Output: "First Last"
#S11 EM
Write a Python program that accepts a comma separated sequence of words as input and
prints the unique words in sorted form (alphanumerically).
Sample Words : red, white, black, red, green
Expected Result : black, green, red, red, white
#S12 MH
Write a Python program to count repeated characters in a string.
Sample string: 'thequickbrownfoxjumpsoverthelazydog'
Expected output :
o 4
e 3
u 2
h 2
r 2
t 2
#Li1 M
WAP to remove empty strings from the list of strings. Take list as input from the user.
For example: Input: ["My", "name", "", "is", "", "Alankrita", "", "."]
Output: ["My", "name", "is", "Alankrita", "."]
#Li2 H
WAP to make a list of all the characters starting from character 'A' to input charaacter from the user.
For e.g. Input: 'H'
Output: ["A", "B", "C", "D", "E", "F", "G", "H"]
#Li3 H
WAP to check if a specific employee e is present in a company or not. Employee names are saved in a list.
e is taken as input from the user.
For example: empList = ["Ashwin", "Rachit", "Sanjana", "David", "Komal"]
Input1: "Komal"
Output1: "Employee is present"
Input2: "Harshil"
Output2: "Employee is not present"
#Li4 M
Write a python program to find the maximum and minimum number in a list of 10 elements
(taken as input from the user) and also find the index position of the these numbers.
For example: Input : [25, 2, 1, 86, 42, 32, 27, 12, 31, 10]
Output: Max Number: 86, Index of Max Number: 3
Min Number: 1, Index of Min Number: 2
#Li5 M
Given two Python lists of same length. Iterate both lists simultaneously such that list1
should display item in original order and list2 in reverse order.
For example: Input = list1 = [10, 20, 30, 40]
list2 = [100, 200, 300, 400]
Output: 10 400
20 300
30 200
40 100
#Li6 M
WAP to concatenate two lists index-wise.
list1 = ["M", "na", "i", "Ashu"]
list2 = ["y", "me", "s", "tosh"]
Output: ['My', 'name', 'is', 'Ashutosh']
#Li7 M
WAP to remove/delete items from a list while iterating without creating a duplicate list.
Take the elements to be deleted from the user in real-time.
#Li8 E
WAP to generate a Python list of all the prime numbers between n to m where n & m are taken as input from the user.
#Li9 M
WAP to concatenate two lists in the following order:
list1 = ["Hello ", "World"]
list2 = ["Hi", "There"]
Output: ['Hello Hi', 'Hello There', 'World Hi', 'World There']
#Li10 M
Given two lists having names of students and their corrsponding marks.
names = ["Ashutosh", "Ajay", "Alankrita", "Rachit", "Komal", "Anil"]
marks = [23, 21, 26, 23, 27, 24]
Take name of a student as input from the user and output his/her marks.
For e.g.:
Input1: "Alankrita"
Output1: 26
Input2: "Someone"
Output2: "Student not found"
#Li11 H
Extended question of #Li10
Add an option to change marks of any students in the same code of #Li10. Take student name and new marks from the user.
Print the modified list as output.
For e.g.: Input: "Ajay"
new_mark: 25
Output: marks = [23, 25, 26, 23, 27, 24]
#Li12 H
Extended question of #Li10
Give an option to enter the marks of a new student into the existing lists names and marks.
Take new data as input from user.
Print the new names and marks list as output.
For e.g.: Input: New_name = "Harshil"
new_Marks = 20
Output: names = ["Ashutosh", "Ajay", "Alankrita", "Rachit", "Komal", "Anil", "Harshil"]
marks = [23, 21, 26, 23, 27, 24, 20]
#D1
WAP in Python to merge following dictionaries to create a new one:
dic1={1:10, 2:20}
dic2={3:30, 4:40}
dic3={5:50, 6:60}
#D2
WAP in python to generate and print a dictionary that contains a number (between 1 and n)
in the form {x : x*x} where n is the input from the user.
For e.g. Input: 4
Output: {1:1, 2:4, 3:9, 4:16}
#D3
WAP in python to find the number of vowels, consonants, digits, white space characters &
special characters in a string and save the result in the form of a dictionary.
For e.g.: Input: 'hello@123'
Output: {'vowels':2, 'consonants':3, 'digits':3, 'whites':0, 'SpecChars':1}
#D4
WAP to reverse map the dictionary items. Take dictionary as input from the user.
For eg., Input: d = {'A': 65, 'B': 66, 'C': 67, 'D': 68}
Output: d = {65: 'A', 66: 'B', 67: 'C', 68: 'D'}
#D5
WAP to save Username and Password of 10 employees in an organisation.
Take the Username and Password as input from the user one by one and save in the Dictionary.
#D6
Extended Question from #D5
Write an additional functionality to check if an employee is present in the organisation or not.
Basically "Search" Functionality based on their username
Take employee name as input from the user.
If the employee is present, print "Present" else print "Not Present"
#M1
WAP in python that accepts two integers (n) & (m) from user and
computes the value of 2n3 + 5m2 - 7n + 10
#M2
Write a python program to find the intersection of elements from two list
(find the common elements in two lists).
#M3
WAP in Python to find the Max of n numbers all taken as input from the user.
#M4
WAP which takes a sequence of numbers from the user and check if all input numbers are unique.
#M5
WAP to reverse a given integer number.
Example: Input: 105320
Output: 023501
#M6
WAP to take 10 integer inputs from the user and save them in a list.
The inputs have to be mix of even and odd numbers.
Now make one list to save all the even numbers from the input list.
Make another list for odd numbers too.
#M7
WAP to convert temperature in Fahrenheit to Celsius. Take the temperature from the user in float type.
#M8
WAP to continuously take Names as input from the user.
Save the incoming names into a list as Full Name and save {First Name:Second Name} in a dictionary.
Take inputs till the user enters "Stop"
For e.g.: Input: "Shahrukh Khan", "Gauri Khan",..................."Stop"
Output: list1 = ["Shahrukh Khan", "Gauri Khan",....................]
dict1 = {"Shahrukh":"Khan", "Gauri":"Khan", .....................}
#M9
WAP to make a simple and compound interest calculator. Take all the necessary data as input from the user.
Office:- 660, Sector 14A, Vasundhara, Ghaziabad, Uttar Pradesh - 201012, India