0% found this document useful (0 votes)
2 views19 pages

Informatics Practices

The document contains a series of programming exercises focused on various basic programming concepts, such as checking eligibility for voting, determining even or odd numbers, and calculating areas. Each question includes a prompt for a solution and an output section, but the actual solutions and outputs are not provided. The exercises cover a range of topics, including conditional statements, 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)
2 views19 pages

Informatics Practices

The document contains a series of programming exercises focused on various basic programming concepts, such as checking eligibility for voting, determining even or odd numbers, and calculating areas. Each question includes a prompt for a solution and an output section, but the actual solutions and outputs are not provided. The exercises cover a range of topics, including conditional statements, 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/ 19

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 C
<=80
Below 60 D
Output:-

[Type here]
Solution8:-

Q9:- WAP to accept the cost price of a bike and display the road
tax to be paid according to the following criteria:

Cost Price (In Tax


Rupees)
>100000 15%
>50000 and 10%
<=100000
<=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:-

[Type here]
Output:-

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

Solution11:-

Output:-

Q12:- WAP to check whether a number (accepted from user) is positive or


negative.

Solution12:-

Output:-

[Type here]
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:-

Output:-

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

Solution15:-

[Type here]
Output:-

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

Solution16:-

Output:-

Q17:- WAP to obtain length and breadth of a rectangle and calculate its
area.

Solution17:-

Output:-

[Type here]
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:-

Output:-

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

Solution20:-

Output:-

[Type here]
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:-

Output:-

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

Solution23:-

[Type here]
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:-

Q25:- WAP to calculate profit percentage from the sales of goods that you
made.

Solution25:-

[Type here]
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.

Solution27:-

[Type here]
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:-

Output:-

[Type here]
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.

Solution32:-

Output:-

[Type here]
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:-

Q35:- . Write a program to find area of a triangle.

Solution35:-

[Type here]
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:-

Q46:- Create a program to calculate total cost based on quantity of items


purchased, with tiered pricing structure.

[Type here]
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.

Solution48:-

[Type here]
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:-

Output:-

[Type here]

You might also like