Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

S No.

Questions Signature
Program to add two numbers
1
Program to accept length and breadth and print area and perimeter
2
Program to calculate simple interest
3
Program to accept marks of students and print the percentage and
4 total
Program to accept value in Celsius and convert in Fahrenheit
5
Program to check whether a no. is even or not
6
Program to print larger and smaller no.
7
Program to check whether a no. is multiple of 5
8
Program to accept day no. and print day in words
9
Program to accept a digit and print it in words
10
Program to accept percentage and display grade accordingly
11
Program to accept no from user and print it’s table till 10
12
Program to print factorial of a given no.
13
Program to print all no. which are multiple of 5 from 50 to 100.
14
Program to find the sum of square of all digit of no
15
Program to check whether a no. is palindrome.
16
Program to check whether a no is a perfect no or not
17
Program that reads a line and prints its frequency chart
18
Output of the following string operations
19
Program to check whether the string is a palindrome or not.
20
Program that reads string and then capitalizes every other letter
21
Program that displays how many words are there in the line
22
SIMPLE QUESTIONS
Q-1 Write a program to add two numbers
INPUT

OUTPUT
Q-2 Write a program to accept length and breadth and print area and perimeter
INPUT

OUTPUT
Q-3 Write a program to calculate simple interest
INPUT

OUTPUT
Q-4 Write a program to accept marks of 5 subjects of students and print the percentage
and total of student if all marks are given out of 50.
INPUT

OUTPUT
Q-5 Write a program to accept value in Celsius and convert in Fahrenheit
INPUT

OUTPUT
IF QUESTIONS
Q-1 Write a program to check whether a no. is even or not
INPUT

OUTPUT
Q-2 Write a program to print larger and smaller no.
INPUT

OUTPUT
Q-3 Write a program to check whether a no. is multiple of 5
INPUT

OUTPUT
IF ELIF QUESTIONS
Q-1 Write a program to accept day no. and print day in words
INPUT

OUTPUT
Q-2 Write a program to accept a digit and print it in words
INPUT

OUTPUT
Q-3 Write a program to accept percentage and display grade accordingly
PERCENTAGE GRADE
>90% A+
75%-90% A
60%-75% B
50%-60% C
<50% D

INPUT

OUTPUT
FOR LOOP
Q-1 Write a program to accept no from user and print it’s table till 10.
INPUT

OUTPUT
Q-2 Write a program to print factorial of a given no.
INPUT

OUTPUT
Q-3 Write a program to print all no. which are multiple of 5 from 50 to 100.
INPUT

OUTPUT
WHILE LOOP
Q-1 Write a program to find the sum of square of all digit of no
INPUT

OUTPUT
Q-2 Write a program to check whether a no. is palindrome.
INPUT

OUTPUT
Q-3 Write a program to check whether a no is a perfect no or not
INPUT

OUTPUT
STRINGS QUESTIONS
Q1. Write a program that reads a line and prints its frequency chart like,

Number of uppercase letters

Number of lowercase letters

Number of alphabets

Number of digits

INPUT

OUTPUT
Q2. Consider the following string myAddress:

What will be the output of the following string operations?

INPUT

OUTPUT
Q3. Write the program to check whether the string is a palindrome or not.

INPUT

OUTPUT
Q4. Write a program that reads a string and then prints a string that capitalizes every other letter in the
string, e.g., school becomes sChOol.

INPUT

OUTPUT
Q5. Write a program that reads a line, then counts words and displays how many words are there in the
line.

INPUT

OUTPUT

You might also like