a) Swapping of two number with and without using temporary variable.
b) If the age of Ram, Sam, and Khan are input through the keyboard, write a python program to determine the eldest and youngest of the three.
c) Develop a program that performs arithmetic operations (Addition, Subtraction, Multiplication, and Division) on integers. Input the two integer values and operator for performing arithmetic operation through keyboard. The operator codes are as follows:
d) Implement the python program to generate the multiplication table.
e) Implement Python program to find sum of natural numbers .
f) If the first name of a student is input through the keyboard, write a program to display the vowels and consonants present in his/her name.
g ) The marks obtained by a student in 5 different subjects are input through the keyboard. Find the average and print the student grade as per the MITS examination policy as shown below.
% OBTAINED GRADE
90 - 100 O (Outstanding)
80 - 89 A+ (Excellent)
70 - 79 A (Very Good)
60 - 69 B+ (Good)
50 - 59 B (Above)
45 - 49 C (Average)
40 - 44 P (Pass)
< 40 F (Fail)
h) Implement Python Script to generate prime numbers series up to N.
i) Given a number x, determine whether it is Armstrong number or not. Hint: For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371. Write a program to find all Armstrong number in the range of 0 and 999.
a) Write a Python script to
b) Write a Python script to read the values from a list and to display largest and smallest numbers from list.
c) Write a Python script to compute the similarity between two lists.
d) Write a Python script to read set of values from a Tuple to perform various operations.
e) Write a Python script to perform basic dictionary operations like insert, delete and display.
f) Write a Python program to count the occurrence of each word in a given sentence.
g) Define a dictionary named population that contains the following data.
Keys Values
Shanghai 17.8
Istanbul 13.3
Karachi 13.0
Mumbai 12.5
h) Write a Python script to create Telephone Directory using dictionary and list to perform basic functions such as Add entry, Search, Delete entry, Update entry, View and Exit.
i) Implement Python script to display power of given numbers using function.
j) Implement a Python program that takes a list of words and returns the length of the longest one using function.
a) Implement Python program to perform various operations on string using string libraries.
b) Implement Python program to remove punctuations from a given string.
c) Write a Python program to change the case of the given string (convert the string from lower case to upper case). If the entered string is “computer”, your program should output “COMPUTER” without using library functions.
d) Implement Python program to capitalize each word in a string. For example, the entered sentence “god helps only people who work hard” to be converted as “God Helps Only People Who Work Hard”
e) Write a Python script to display file contents.
f) Write a Python script to copy file contents from one file to another.
g) Write a Python script to combine two text files contents and print the number of lines, sentences, words, characters and file size.
h) Write a Python commands to perform the following directory operations.
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.