Computer Practical
Computer Practical
Code:
Output:
Code:
Output:
Output:
Code:
Output:
5. Write a program that reads two numbers and prints their quotient and
remainder.
Code:
Output:
Output:
7. Write a program to accept the height in cm and convert it into feet and
inches.
Code:
Output:
8. Write a program that accepts two numbers and check if the first number
is fully divisible by second number or not.
Code:
Output:
9. Write a program to accept the year and check if it is a leap year or not.
Code:
Output:
Code:
Output:
11. Write a program to input percentage marks of a student and find
the grade as per the following criteria.
Marks Grade
>=90 A
75-90 B
60-75 C
Below 60 D
Code:
Output:
Code:
Output:
Code:
Output:
Code:
Output:
Code:
Output:
Code:
Output:
Code:
Output:
18. Write a program to read an integer >1000 and reverse the number.
Code:
Output:
19. Write a program to print a pattern like:
4321
432
43
4
Code:
Output:
20. Program that reads a line and print its statistics like:
Number of uppercase letters:
Number of lowercase letters:
Number of alphabets:
Number of digits:
Number of occurrences of a substring:
Code:
Output:
21. Write a program to input a list and to remove all occurrences of the
given element from the list.
Code:
Output:
Output:
Code:
Output:
24. Write a python program to find the largest value in a dictionary.
Code:
Output:
25. Create a dictionary whose keys are month names and values are
number of days in the corresponding months.
Output:
Code:
Output:
Code:
Output:
Code:
Output: