Prac File
Prac File
NAME:
CLASS:
INDEX
INPUT:
OUTPUT:
INPUT:
OUTPUT:
QUESTION 3: Write A Simple Python Program using Single Line Comment And Multiline
Comment.
INPUT:
OUTPUT:
QUESTION 4: Write a simple Python Program to get the input from the user and use int()
or float() function with the read value to change the type.
INPUT:
OUTPUT:
QUESTION 5: Write a simple python program to obtain three numbers and print their sum.
INPUT:
OUTPUT:
QUESTION 6: Write a Python Program to print area of circle of radius 3.75 metres.
INPUT:
OUTPUT:
QUESTION 7: Write a simple Python Program to take length and breadth of a rectangle
and calculate the area.
INPUT:
OUTPUT:
INPUT:
OUTPUT:
QUESTION 9: Write a Program To Calculate Simple Intrest.
INPUT:
OUTPUT:
INPUT:
OUTPUT:
INPUT:
OUTPUT:
QUESTION 12: Write a program to find elder person in 2 people.
INPUT:
OUTPUT:
QUESTION 13: Write a program to find given year is leap year or not.
INPUT:
OUTPUT:
INPUT:
OUTPUT:
QUESTION 15: Write a Program to find largest among three integers.
INPUT:
OUTPUT:
QUESTION 16: Write a program that accepts weight in Kg and height in meters and
calculate the BMI.
INPUT:
OUTPUT:
QUESTION 17: Write a program that reads the number n and calculate n2,n3,n4 using
power function.
INPUT:
OUTPUT:
QUESTION 18: Write a Program to obtain x,y,z from the user and calculate 4x4+3y3+9z+6.
INPUT:
OUTPUT:
Marks Grode
Marks Grade
>=90 A
75-90 B
60-75 C
Below 60 D
INPUT:
OUTPUT:
QUESTION 20: . Write a program to display a menu for calculating area of circle or
perimeter or the circle.
INPUT:
OUTPUT:
QUESTION 21: Write a program that reads two numbers and an arithmetic operator and
displays the computed result.
INPUT:
OUTPUT:
INPUT:
OUTPUT:
QUESTION 23: Write a program to print sum of natural numbers between 1 to 7. Print the
sum progressively i.e. after adding each natural number, print sum so far.
INPUT:
OUTPUT:
INPUT:
OUTPUT:
QUESTION 25: Program that reads a line and print its statistics like:
Number of alphabets:
Number of digits:
INPUT:
OUTPUT:
QUESTION 26: Write a program that reads a line and substring and displays the number of
occurrences of the given substring in the line.
INPUT:
QUESTION 27: Write a program that takes a string with multiple words and then
capitalizes the first letter of each word and forms a new string out of it.
INPUT:
OUTPUT:
QUESTION 28: Write a program that reads a string and checks whether it is a palindrome
string or not.
INPUT:
OUTPUT:
QUESTION 29: Write a program that reads a string and then prints a string that capitalizes
every other letter in the string.
INPUT:
OUTPUT:
QUESTION 30: Write a program to find the sum of all the elements in a list.
INPUT:
OUTPUT:
INPUT:
OUTPUT:
QUESTION 32: Write a program to find the minimum and maximum number in a list
entered by a user.
INPUT:
OUTPUT:
QUESTION 33: Write a program that take a list as an argument, adds 5 in all the odd values
and 10 in all the even values of a list and displays the list.
INPUT:
OUTPUT:
QUESTION 34: Write a Program to display unique and duplicate items of a given list in two
different lists.
INPUT:
OUTPUT:
QUESTION 35: Write a Program to find and display the sum of all the value which are
ending with 3 from a list.
INPUT:
OUTPUT:
QUESTION 36: . Write a Program to shift the negative numbers to the right and the
positive numbers to the left so that the resultant looks like Original=[-12,11,-13,-5,6,-7,5,-
3,-6] Output should be =[11,6,5,-6,-3,-7,-5,-13,-12]
INPUT:
OUTPUT:
QUESTION 37: Writ a Program to read a list of n integers (positive as well as negative).
Create two lists, one having all positive and another having all negative integers from the
given list. Print all three lists.
INPUT:
OUTPUT:
QUESTION 38: WAP to input any two tuples and swap their values.
INPUT:
OUTPUT:
QUESTION 39: WAP to input’n’ names and phone numbers to store it in a dictionary and
print the phone number of a particular name.
INPUT:
OUTPUT:
QUESTION 40: Write a Program to input ‘n’ employees and their salary details like basic
salary,hra,ca. Calculate total salary of each employee.
INPUT:
OUTPUT:
QUESTION 41: Write a program to create a phone dictionary for the students of class XI
and print their index values.
INPUT:
OUTPUT:
QUESTION 42: Write a Program to create a dictionary whose keys are months and values
are number of days in the corresponding month. Then ask user to enter a month name
and use this dictionary to tell how many days are there in a month.
INPUT:
OUTPUT:
QUESTION 43: Write a Python Program to input names of ‘n’ countries and capital and
currency, store it in a dictionary and display in tabular form. Also search and display for a
particular country.
INPUT:
OUTPUT:
QUESTION 44: Write a Python program to input total number of sections and stream
name in 11th class and display all information on output screen.
INPUT:
OUTPUT:
INPUT:
OUTPUT:
OUTPUT: