0% found this document useful (0 votes)
3 views

Informatics Practices

The document contains a series of programming tasks aimed at practicing various programming concepts. Each task includes a brief description, a placeholder for the solution, and an output section. The tasks cover a wide range of topics, including conditionals, loops, and basic arithmetic operations.

Uploaded by

iamlol0129
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Informatics Practices

The document contains a series of programming tasks aimed at practicing various programming concepts. Each task includes a brief description, a placeholder for the solution, and an output section. The tasks cover a wide range of topics, including conditionals, loops, and basic arithmetic operations.

Uploaded by

iamlol0129
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Informatics Practice Practical

File
Q 1:- WAP to check whether a person is eligible for voting or not.

Solution1:-

Output:-

Q2:- WAP to check whether number entered by user is Even or not.

Solution2:-

Output:-

Q3:- WAP to check whether number is divisible by 7 or not.

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

for Monday & so on.

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:-

Q11:- WAP to check whether a person is senior citizen or not.

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:-

Q14:- Accept the age of 4 people and display oldest one.

Solution14:-

[Type here]
Output:-

Q15:- WAP to obtain three numbers and print their sum.

Solution15:-

Output:-

Q16:- Write a program to input a welcome message and print it.

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:-

Q19:- WAP to input a number and print its cube.

Solution19:-

[Type here]
Output:-

Q20:- WAP to input a value in km and convert it into miles.

Solution20:-

Output:-

Q21:- WAP to input a value in tones and convert it into quintals and kilograms.

Solution21:-

Output:-

Q22:- WAP to enter a small poem verse and print it.

Solution22:-

[Type here]
Output:-

Q23:- WAP to input two numbers and swap them.

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:-

Q28:- Write a program that generates the following output: 5 10 9

Solution28:-

Output:-

Q29:- .Modify the above program so as to print output as 5@10@9.

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:-

Q34:- Write a program to read a number and print n², n3 and n4 .

Solution34:-

Output:-

[Type here]
Q35:- . Write a program to find area of a triangle.

Solution35:-

Output:-

Q36:- Write a program to compute simple interest and compound interest.

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:-

Q50:- Write a program to input and print its Square.

Solution50:-

[Type here]
Output:-

Q51:-Write a word 3 times.

Solution51:-

Output:-

Q52:- WAP to display first 10 natural numbers.

Solution52:-

Output:-

Q53:- WAP to display first 10 even numbers.

Solution53:-

Output:-

[Type here]
Q54:- WAP to display first 10 odd numbers. Output:-

Solution54:-

Q55:- WAP to display first 10 even numbers in reverse order.

Solution55:-

Output:-

Q56:- WAP to print table of a number accepted from user.

Solution56:-

[Type here]
Output:-

Q57:- Table of a number entered by user.

Solutio57:-

Output:-

Q58:- Sum of first 10 natural numbers.

Solution58:-

[Type here]
Output:-

[Type here]
[Type here]

You might also like