PRACTICAL LIST CLASS 11
INPUT/OUTPUT PYTHON PROGRAM
INPUT/OUTPUT PYTHON PROGRAM
1.
Write
a simple python program in a Text Editor to print “Hello World”.
2.
Write
a simple python program to assign same value to multiple variables.
3.
Write
a simple python program to assign multiple values to multiple variables.
4.
Write
a simple python program using single line comment and multiline comment.
5.
Write
a simple python program to get the input from the user interactively using the
built-in function input ().
6.
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.
7.
Write
a python program to print the area of a circle of radius 3.75 meters.
8.
Write
a simple python program to obtain three numbers and print their sum.
9.
Write
a simple python program to obtain length and breadth of a rectangle and
calculate the area.
10.
Obtain
temperatures of 07 days and then display average temperature of the week.
NUMBER / DIGIT BASED
1.
Swap the two numbers
2.
Count the number of digits in a given number
3.
Display the sum of the digits of the number entered
4.
Display the number in reverse.
5.
WAP to display Digits of a number entered in text. For
eg 234 should be printed as
TWO THREE FOUR
Conditional Statement
1.
WAP to
find no is –ve or +ve
2.
WAP to
find no is even and odd
3.
WAP to
find elder person in 2 persons
4.
WAP to
find given year is leap year or not
5.
Write
a program to compute area of square or a triangle , choice given by user
6.
WAP to
display age is greater than 18 or not
7.
Write
a program to compute simple interest.
8.
WAP to
find Person is senior citizen or not, input age
9.
WAP to
find which no is greater no in 2 numbers
10.
WAP to
find which no is lowest no in 2 numbers
11.
WAP to
find which no is greater no in 3 numbers
12.
WAP to
check whether a number is divisible by 5 and 11 or not.
13. Check
whether a number is prime or not
14.
WAP to
Check given character is vowel or not.
15.
WAP to
input marks in 3 subjects, compute average and then calculate
grades as per following guidelines:
grades as per following guidelines:
Grade Remarks Marks
A Level 4,above agency-normalized standards 80% and above
B Level 3,at agency-normalized standards 70-79%
C Level2,Below but approaching agency- normalized standards 60-69%
D Level 1-well below agency normalized standards 50-59%
E Level 1- too below agency normalized standards 40-49%
R Remedial standards 39% and below
A Level 4,above agency-normalized standards 80% and above
B Level 3,at agency-normalized standards 70-79%
C Level2,Below but approaching agency- normalized standards 60-69%
D Level 1-well below agency normalized standards 50-59%
E Level 1- too below agency normalized standards 40-49%
R Remedial standards 39% and below
16.
Write
a menu driven program to calculate:
a.
Area
of circle[A=πr2]
b.
Area of square [A=a*a]
c. Area of rectangle[A=l*b]
ITERATIVE STATEMENTS
1.
WAP to
display all number from 1 to N where n is entered by the user .
2.
WAP to
display sum of all numbers from 1 to 10.
3.
WAP to
display Average of numbers from 1 to 10.
4.
WAP to
display multiply all numbers from 1 to 10.
5.
WAP to
display Square all numbers from 1to 10.
6.
WAP to
display Cube all numbers from 1to 10
7.
WAP to
display all odd numbers from 1to 10
8.
WAP to
display all even numbers from 1to 10
9.
WAP
that uses for loops to print the sequence of letters below.
ABBCCCDDDDEEEEE
ABBCCCDDDDEEEEE
10.
WAP to
print the following
*
**
***
****
*****
*
**
***
****
*****
11.
WAP to
print following pattern
# # # # #
# # # #
# # #
# #
#
# # # # #
# # # #
# # #
# #
#
12.
Write
a script to print following:
8
86
864
8642
8
86
864
8642
13.
Take
an integer input N from the user. Print N Fibonacci numbers. Recall that
Fibonacci series progresses as 0 1 1 2 3 5 8…
14.
Take
an integer input N from the user. Find Factorial of N and print it .
15.
Print
first 10 prime numbers.
16.
Print
first 10 odd numbers
17.
Take
an integer input N from the user. Print the table of N.
18.
WAP to
check whether the given number is palindrome or not.
String Manipulation
1.
WAP
that should perform the following tasks
a.
After
getting a word from the user, your program should use a loop to print out each
of the letters of the word. Just remember that strings in Python start with
element 0!.
b.
Print
out each of the letter in reverse order.
c.
Make a
new variable that is the original word reverse and print variable.
2.
Code
to count number
3.
Write
a loop that prints out the index of every ‘i’ in ‘Mississippi’.
4.
Using
endswith() and startwith() function print the character used in the start and
end of a string.
5.
Write
a python program to enter a string and a substring. It should then display the
number of occurrences of the given substring in the line.
6.
WAP
that inputs a word and prints “Yes it starts!!”if the given word starts with
“0”,”1”,”2”,…………..,”9”.
7.
WAP to
reverse a string by using function.
8.
WAP to
replace a character in a string.
9.
Program
to print whether a given character is an uppercase or a lowercase character or a
digit or any other character.
10.
Write
a python program to enter a string in smaller case and convert it into upper
case.
11.
Write
a python program to enter a string and print the length of the string using
built-in function.
12.
Write
a python program to replace one string with the other string.
13.
Write
python program to enter a string and then enter a character and check the
frequency of that character in that string.
14.
Write
a python program that receives the index and returns the corresponding value.
LIST
1.
WAP
that returns the largest even number in the list of integers. If there is no
even number in input, print ”No even
number”.
2.
Write
a python program to print elements of a list [‘q’,’w’,’e’,’r’,’t’,’y’] in
separate lines along with element’s both indexes.
3.
WAP
that prints the sum of the even indexed elements of L, minus the
sum of the odd-indexed elements of L.
sum of the odd-indexed elements of L.
4.
WAP to
find the median from a given list.
5.
WAP to
find the mode, from a given list.
6.
Write
a python program that inputs a list of numbers and shifts all the
zero’s to right and all non-zero numbers to left of the list.
zero’s to right and all non-zero numbers to left of the list.
DICTIONARIES
1.
Write
a program to create a phone dictionary for the students of class XI
and print their Index values.
and print their Index values.
2.
WAP
that users a dictionary that contains ten usernames and
password. The program should ask the user to enter their username and
passwords. If user name is not in the dictionary, the program should
indicate that the person is not a valid user of the system. IF the user
name is in the dictionary, but the user does not enter the right
password, the program should say that the password is invalid. If the
password is correct, then the program should tell the user that they are
now logged into the system.
password. The program should ask the user to enter their username and
passwords. If user name is not in the dictionary, the program should
indicate that the person is not a valid user of the system. IF the user
name is in the dictionary, but the user does not enter the right
password, the program should say that the password is invalid. If the
password is correct, then the program should tell the user that they are
now logged into the system.
3.
Create
a nested dictionary that stores the marks details along with
student names and then prints the output.
student names and then prints the output.
No comments:
Post a Comment