Informatics Practices
Informatics Practices
File
Q 1:- WAP to check whether a person is eligible for voting or not.
Solution1:-
Output:-
Solution2:-
Output:-
Solution3:-
Output:-
[Type here]
Q4:- WAP to check whether number is divisible by 3 or not.
Solution4:-
Output:-
Q5:- WAP to check whether the year entered by user is leap year or not.
Solution5:-
Output:-
Q6:- Write a program to display "Hello" if age entered by user is multiple of five otherwise
display "Bye".
Solution6:-
[Type here]
Output:-
Q7:- WAP to accept a no. from 1 to 7 & display the name of the day like 1 for Sunday, 2
Solution7:-
Output:-
Q8:- WAP to accept percentage from user & display the grade according to the following criteria:
Marks Grade
>90 A
>80 and <=90 B
>=60 and <=80 C
Below 60 D
Output:-
Solution8:-
Q9:- WAP to accept the cost price of a bike and display the road tax to be paid according to
the following criteria:
[Type here]
Cost Price (In Rupees) Tax
>100000 15%
>50000 and <=100000 10%
<=50000 5%
Solution9:-
Output:-
Q10:- Write a program to accept a number from 1 to 12 and display name of the month and days in
that month like 1 for January and number of days 31 and so on.
Solution10:-
Output:-
Solution11:-
[Type here]
Output:-
Q12:- WAP to check whether a number (accepted from user) is positive or negative.
Solution12:-
Output:-
Q13:- Accept the temperature in degree Celsius of water and check whether it is boiling or not.
Solution13:-
Output:-
Solution14:-
[Type here]
Output:-
Solution15:-
Output:-
Solution16:-
[Type here]
Output:-
Q17:- WAP to obtain length and breadth of a rectangle and calculate its area.
Solution17:-
Output:-
Q18:- WAP to find Body Mass Index (BMI) of a person using person's height and weight. (Formula:
BMI=kg/.
Solution18:-
Output:-
Solution19:-
[Type here]
Output:-
Solution20:-
Output:-
Q21:- WAP to input a value in tones and convert it into quintals and kilograms.
Solution21:-
Output:-
Solution22:-
[Type here]
Output:-
Solution23:-
Output:-
Q24:- WAP to input three numbers and swap them as this: 1st no. Becomes the 2nd no., 2nd no. Becomes
the third number and the 3rd no. Becomes the first no.
Solution:-
Output:-
[Type here]
Q25:- WAP to calculate profit percentage from the sales of goods that you made.
Solution25:-
Output:-
Q26:- WAP that displays a joke. But display the punchline only when the user passes enter key.
Solution26:-
Output:-
Q27:- Write program to read today’s date from user then display how many days are left in the current
Month.
[Type here]
Solution27:-
Output:-
Solution28:-
Output:-
Solution29:-
[Type here]
Output:-
Q30:- Write the program with maximum three lines of code and that assigns first 5 multiples of a number
to 5 variables and then print them.
Solution30:-
Output:-
Q31:- Write a Python program that accepts radius of a circle and prints its area.
Solution31:-
Output:-
Q32:- Write Python program that accepts marks in 5 subjects and outputs average marks.
[Type here]
Solution32:-
Output:-
Q33:- Write a short program that asks for your height in centimeters and then converts your height to
feet and inches. (1 foot = 12 inches, 1 inch = 2.54 cm).
Solution33:-
Output:-
Solution34:-
Output:-
[Type here]
Q35:- . Write a program to find area of a triangle.
Solution35:-
Output:-
Solution36:-
Output:-
Q37- Write a program to input a number and print its first five multiples.
Solution40:-
[Type here]
Output:-
Q38:- Write a program to read three numbers in three variables and swap first two variables with the
sums of first and second, second and third numbers respectively.
Solution42:-
Output:-
Q4:- Write a program to input the cost price, selling price and print the profit earned.
Solution43: -
[Type here]
Output:-
Q44:- Write a program to input the total liabilities and shareholders' equity of a company and print its
D/E Total Liabilities.
Solution44:-
Output:-
Q45:- Write a program to input a company's total assets and total equity and print its equity multiplier as
Total Assets/Total Equity.
Solution45:-
Output:-
[Type here]
Q46:- Create a program to calculate total cost based on quantity of items purchased, with tiered pricing
structure.
Solution46:-
Output:-
Q47:- . Write a program to input length of three sides of a triangle. Then check if these sides will form a
triangle or not.
Solution47:-
Output:-
Q48: - Write a program that reads from user (i) an hour between 1 to 12 and (ii) number of hours ahead.
The program should then print the time after those many hours.
[Type here]
Solution48:-
Output:-
Q49:- . Write a program to input two numbers and test it first number is divisible by the second number or
not.
Solution49:-
Output:-
Solution50:-
[Type here]
Output:-
Solution51:-
Output:-
Solution52:-
Output:-
Solution53:-
Output:-
[Type here]
Q54:- WAP to display first 10 odd numbers. Output:-
Solution54:-
Solution55:-
Output:-
Solution56:-
[Type here]
Output:-
Solutio57:-
Output:-
Solution58:-
[Type here]
Output:-
[Type here]
[Type here]