Class 5 Computer

MID TERM SYLLABUS

FINAL TERM SYLLABUS

BASIC Booklet Programs

Question 1
Write a BASIC program to display the names of any 5 planets in separate lines.

10 CLS  
20 PRINT “EARTH” 
30 PRINT “MARS” 
40 PRINT “SATURN” 
50 PRINT “JUPITER” 
60 PRINT “URANUS” 
70 END

Question 2
Write a BASIC program to display the following pattern:
BASIC
BASI
BAS
BA
B

10 CLS  
20 PRINT "BASIC" 
30 PRINT "BASI"
40 PRINT "BAS" 
50 PRINT "BA" 
60 PRINT "B"
70 END

Question 3
Write a BASIC program to display the following pattern:

W
O
R
L
D
10 CLS  
20 PRINT "W"
30 PRINT " O" 
40 PRINT "R"
50 PRINT " L"
60 PRINT "D"
70 END

Question 4
Write a BASIC program to display the following pattern:

MUSIC
MUSI
MUS
MU
M
10 CLS  
20 PRINT "MUSIC" 
30 PRINT " MUSI" 
40 PRINT "  MUS" 
50 PRINT "   MU"
60 PRINT "    M" 
70 END 

Question 5
Write a BASIC program to display the following pattern:

   W
WEL
WELCO
WELCOME
10 CLS 
20 PRINT "   W" 
30 PRINT "  WEL" 
40 PRINT " WELCO" 
50 PRINT "WELCOME" 
60 END

Question 6
Write a BASIC program to store 2550 in a variable A and 25 in a variable B. Calculate and display their sum and product.

10 CLS 
20 LET A = 2550 
30 LET B = 25 
40 LET S = A + B 
50 LET P = A * B 
60 PRINT "SUM = "; S 
70 PRINT "PRODUCT = "; P 
80 END

Question 7
Write a BASIC program to store 2024 in a variable P and 20 in a variable Q. Calculate and display their difference and the result of P divided by Q.

10 CLS  
20 LET P = 2020 
30 LET Q = 20 
40 LET DIFF = P – Q 
50 LET DIV = P / Q 
60 PRINT "DIFFERENCE = "; DIFF 
70 PRINT "DIVISION = "; DIV 
80 END

Question 8
Write a BASIC program to store your name, age, and height in cm in appropriate variables and then display them in separate lines with proper messages.

10 CLS 
20 LET N$ = "M S DHONI" 
30 LET A = 42 
40 LET H = 175 
50 PRINT "NAME = "; N$ 
60 PRINT "AGE = "; A; " YEARS"
70 PRINT "HEIGHT IN CM = "; H 
80 END

Question 9
Write a BASIC program to store 10000 in a variable and then find and display its predecessor and successor.

10 CLS 
20 LET N = 10000 
30 LET P = N – 1 
40 LET S = N + 1 
50 PRINT "PREDECESSOR = "; P 
60 PRINT "SUCCESSOR = "; S 
70 END

Question 10
Write a BASIC program to store a book’s title, author and price in suitable variables and display them in separate lines with proper messages.

10 CLS 
20 LET T$ = "TINTIN IN TIBET"
30 LET A$ = "GEORGES REMI" 
40 LET P = 409 
50 PRINT "BOOK TITLE = "; T$ 
60 PRINT "AUTHOR = "; A$ 
70 PRINT "PRICE = Rs. "; P 
80 END

Question 11
Write a BASIC program to store the distance of 9 km in a variable and convert and display it in meters.

10 CLS 
20 LET KM = 9 
30 LET M = KM * 1000 
40 PRINT "DISTANCE IN METRES = "; M 
50 END

Question 12
Write a BASIC program to store the distance of 428km 70m in a variable and convert and display it in meters.

10 CLS 
20 LET KM = 428.070 
30 LET M = KM * 1000 
40 PRINT "DISTANCE IN METRES = "; M 
50 END

Question 13
Write a BASIC program to store the mass of 56009g in a variable and convert and display it in kg.

10 CLS 
20 LET G = 56009 
30 LET KG = G / 1000 
40 PRINT "MASS IN KG = "; KG 
50 END

Question 14
Write a BASIC program to store the capacity 57 L 109 mL in a variable and convert and display it in mL.

10 CLS 
20 LET L = 57.109 
30 LET ML = L * 1000 
40 PRINT "CAPACITY IN ML = "; ML 
50 END

Question 15
Write a BASIC program to store the length 7 m in a variable and convert and display it in mm.

10 CLS  
20 LET M = 7 
30 LET CM = M * 100 
40 LET MM = CM * 10 
50 PRINT "LENGTH IN MM = "; MM 
60 END

Question 16
Write a BASIC program to store the number 108 in a variable and find and display its double and half.

10 CLS 
20 LET N = 108 
30 LET D = N * 2 
40 LET H = N / 2 
50 PRINT "DOUBLE = "; D 
60 PRINT "HALF = "; H 
70 END

Question 17
The cost of 1 notebook is ₹45. Write a BASIC program to find and display the cost of 12 such notebooks.

10 CLS 
20 LET C = 45 
30 LET N = 12 
40 LET P = C * N 
50 PRINT "TOTAL COST = "; P 
60 END

Question 18
The cost of 12 movie tickets is ₹1440. Write a BASIC program to find and display the cost of 1 such movie ticket.

10 CLS 
20 LET N = 12 
30 LET T = 1440 
40 LET C = T / N 
50 PRINT "COST OF 1 MOVIE TICKET = "; C 
60 END

Question 19
A student scored 45 in math, 40 in science and 50 in computer. Write a BASIC program to find and display his/her total marks.

10 CLS  
20 LET M = 45 
30 LET S = 40 
40 LET C = 50 
50 LET T = M + S + C 
60 PRINT "TOTAL MARKS = "; T 
70 END

Question 20
The side of a square measures 25 cm. Write a BASIC program to find and display its perimeter. [Perimeter = 4 × Side]

10 CLS 
20 LET SIDE = 25 
30 LET P = 4 * SIDE 
40 PRINT "PERIMETER = "; P 
50 END

Question 21
The side of a square measures 14 cm. Write a BASIC program to find and display its area. [Area = Side × Side]

10 CLS 
20 LET SIDE = 14 
30 LET A = SIDE ^ 2 
40 PRINT "AREA = "; A 
50 END

Question 22
The length and the breadth of a rectangle are 24 cm and 18 cm respectively. Write a BASIC program to find and display its perimeter. [Perimeter = 2 × (Length + Breadth)]

10 CLS 
20 LET L = 24 
30 LET B = 18 
40 LET P = 2 * (L + B) 
50 PRINT "PERIMETER = "; P 
60 END

Question 23
The length and breadth of a rectangle are 20 cm and 15 cm respectively. Write a BASIC program to find and display its area. [Area = Length × Breadth]

10 CLS 
20 LET L = 20 
30 LET B = 15 
40 LET A = L * B 
50 PRINT "AREA = "; A 
60 END

Question 24
Write a BASIC program to store a number 72 in a variable and find and display its twice and thrice.

10 CLS   
20 LET N = 72 
30 LET TW = N * 2 
40 LET TR = N * 3 
50 PRINT "TWICE = "; TW 
60 PRINT "THRICE = "; TR 
70 END

Question 25
The cost of 1 egg is ₹7. Write a BASIC program to find and display the cost of 1 dozen eggs.

10 CLS 
20 LET C = 7 
30 LET T = C * 12 
40 PRINT "TOTAL COST = "; T 
50 END

Question 26
A girl purchases bread for ₹35, milk for ₹50, and biscuits for ₹65. Write a BASIC program to find and display the total bill.

10 CLS 
20 LET B = 35 
30 LET M = 50 
40 LET BIS = 65 
50 LET T = B + M + BIS 
60 PRINT "TOTAL BILL = "; T 
70 END

Question 27
The perimeter of a square is 72 cm. Write a BASIC program to find and display the measure of its side. [Side = Perimeter / 4]

10 CLS  
20 LET P = 72 
30 LET S = P / 4 
40 PRINT "SIDE = "; S 
50 END

Question 28
The weight of 1 packet of sweets is 1 kg 75 g. Write a BASIC program to find and display the weight of 5 such packets of sweets.

10 CLS 
20 LET W = 1.075 
30 LET TW = W * 5 
40 PRINT "TOTAL WEIGHT = "; TW 
50 END

Question 29
Write a BASIC program to convert and display 7070 m into hectometer.
[1 hectometer = 100 m]

10 CLS  
20 LET M = 7070 
30 LET H = M / 100 
40 PRINT "LENGTH IN HECTOMETER = "; H 
50 END

Question 30
Write a BASIC program to convert and display 450 cm into decimeter.
[1 decimeter = 10 cm]

10 CLS 
20 LET CM = 450 
30 LET DM = CM / 10 
40 PRINT "LENGTH IN DECIMETER = "; DM 
50 END

Question 31
Write a BASIC program to input the length and the breadth of a rectangle and calculate and display its area and perimeter. [Area = Length × Breadth, Perimeter = 2(Length + Breadth)]

10 CLS 
20 INPUT "ENTER THE LENGTH"; L 
30 INPUT "ENTER THE BREADTH"; B 
40 LET A = L * B 
50 LET P = 2 * (L + B) 
60 PRINT "AREA = "; A 
70 PRINT "PERIMETER = "; P 
80 END

Question 32
Write a BASIC program to accept your friend’s name, his/her marks in Computers and section. Display the entered details in separate lines.

10 CLS 
20 INPUT "ENTER YOUR NAME"; N$ 
30 INPUT "YOUR MARKS IN COMPUTERS"; M 
40 INPUT "YOUR SECTION"; S$ 
50 PRINT "NAME = "; N$ 
60 PRINT "MARKS IN COMPUTER = "; M 
70 PRINT "SECTION = "; S$ 
80 END

Question 33
Write a BASIC program that accepts a number of weeks as input and calculates and displays the total number of hours contained in those weeks.

10 CLS 
20 INPUT "ENTER THE NUMBER OF WEEKS"; W 
30 LET D = W * 7 
40 LET H = D * 24 
50 PRINT H; " HOURS" 
60 END

Question 34
Write a BASIC program to input the marks scored by a student in Physics, Chemistry and Biology. Calculate and display the total marks.

10 CLS 
20 INPUT "MARKS IN PHYSICS"; P 
30 INPUT "MARKS IN CHEMISTRY"; C 
40 INPUT "MARKS IN BIOLOGY"; B 
50 LET T = P + C + B 
60 PRINT "TOTAL MARKS = "; T 
70 END

Question 35
Write a BASIC program to input the perimeter of a square. Calculate and display the measure of its side. [Side = Perimeter / 4]

10 CLS 
20 INPUT "ENTER PERIMETER OF SQUARE"; P 
30 LET S = P / 4 
40 PRINT "MEASURE OF SIDE = "; S 
50 END

Question 36
Write a BASIC program to input the height of a student in meters and convert and display it in centimeters, and in inches too. [1 m = 100 cm, 1 inch = 2.54 cm]

10 CLS 
20 INPUT "ENTER HEIGHT IN METERS"; M 
30 LET CM = M / 100
40 LET IN = CM / 2.54 
50 PRINT "HEIGHT IN CM = "; CM
60 PRINT "HEIGHT IN INCHES = "; IN
70 END

Question 37
Write a BASIC program to input a number from the user and calculate its twice, thrice, one-fourth, and 7th multiple. Display these values in different zones.

10 CLS 
20 INPUT "ENTER THE NUMBER"; N 
30 LET TW = N * 2 
40 LET TH = N * 3 
50 LET F = N / 4 
60 LET S = N * 7 
70 PRINT TW, TH, F, S 
80 END

Question 38
Write a BASIC program to input a number in a variable A and store 3 in a variable B. Now calculate and display the result of A ^ B.

10 CLS 
20 INPUT "ENTER A NUMBER"; A 
30 LET B = 3 
40 LET R = A ^ B 
50 PRINT "RESULT = "; R 
60 END

Question 39
Write a BASIC program to store the colour names “RED”, “GREEN”, “BLUE”, “YELLOW” and “PINK” in suitable variables and then display them in separate zones.

10 CLS
20 LET R$ = "RED"
30 LET G$ = "GREEN"
40 LET B$ = "BLUE"
50 LET Y$ = "YELLOW"
60 LET P$ = "PINK"
70 PRINT R$, G$, B$, P$
80 END

Question 40
Write a BASIC program to accept the first name, middle name and the last name in separate variables and display them with comma and semicolon.

10 CLS 
20 INPUT "ENTER YOUR FIRST NAME"; F$ 
30 INPUT "MIDDLE NAME"; M$ 
40 INPUT "LAST NAME"; L$ 
50 PRINT F$, M$, L$ 
60 PRINT F$; M$; L$ 
70 END

Question 41
Write a BASIC program to assign the five vowels in separate variables and display them in different zones.

10 CLS
20 LET A$ = "A"
30 LET E$ = "E"
40 LET I$ = "I"
50 LET O$ = "O"
60 LET U$ = "U"
70 PRINT A$, E$, I$, O$, U$
80 END

Question 42
Write a BASIC program to input a number and find and display its one-third and one-fourth.

10 CLS
20 INPUT "ENTER THE NUMBER"; N
30 LET T = N / 3
40 LET F = N / 4
50 PRINT "ONE-THIRD = "; T
60 PRINT "ONE-FOURTH = "; F
70 END

Question 43
Write a BASIC program to input a number and display the first 5 multiples of that number in 5 different zones.

10 CLS 
20 INPUT "ENTER THE NUMBER"; N 
30 PRINT N, N * 2, N * 3, N * 4, N * 5 
40 END

Question 44
Write a BASIC program to input the runs scored by the opening batsmen. Find and display the total runs score by them.

10 CLS
20 INPUT "FIRST BATSMAN"; B1
30 INPUT "SECOND BATSMAN"; B2
40 LET T = B1 + B2
50 PRINT "TOTAL RUNS SCORED = "; T
60 END

Question 45
Write a BASIC program to input the number of hours and convert and display it in seconds.

10 CLS 
20 INPUT "NUMBER OF HOURS"; H 
30 LET M = H * 60 
40 LET S = M * 60 
50 PRINT "NUMBER OF SECONDS = "; S 
60 END

Question 46
Write a BASIC program to input the names of any three fruits and display them with comma and with semicolon.

10 CLS 
20 INPUT "FIRST FRUIT"; A$ 
30 INPUT "SECOND FRUIT"; B$ 
40 INPUT "THIRD FRUIT"; C$ 
50 PRINT A$, B$, C$ 
60 PRINT A$; B$; C$ 
70 END

Question 47
A student purchases N number of pens, each costing ₹24. Write a BASIC program to find and display the total cost.

10 CLS 
20 INPUT "NUMBER OF PENS"; N 
30 LET C = 24 
40 LET T = N * C 
50 PRINT "TOTAL COST = "; T 
60 END

Question 48
Write a BASIC program to store the first five consonants in separate variables and display them in different zones.

10 CLS 
20 LET C1$ = "B" 
30 LET C2$ = "C" 
40 LET C3$ = "D" 
50 LET C4$ = "F" 
60 LET C5$ = "G" 
70 PRINT C1$, C2$, C3$, C4$, C5$ 
80 END

Question 49
Radha scores 75 marks out of 80. Write a BASIC program to find and display her percentage score.

10 CLS 
20 LET S = 75 
30 LET P = S / 80 * 100 
40 PRINT "PERCENTAGE SCORE = "; P 
50 END

Question 50
A unit test was held on 50 marks. Write a BASIC program to input the marks scored by a student and find and display his/her percentage score.

10 CLS 
20 INPUT "MARKS SCORED"; M 
30 LET P = M / 50 * 100 
40 PRINT "PERCENTAGE SCORE = "; P 
50 END

Question 51
Write a BASIC program to input the number of units consumed for generating electricity bill. Find and display the electricity bill if each unit costs ₹4.50.

10 CLS 
20 INPUT "NUMBER OF UNITS"; N 
30 LET C = 4.50 
40 LET B = N * C 
50 PRINT "ELECTRICITY BILL = "; B 
60 END

Question 52
Write a BASIC program to input the day number, month number and year in separate variables and print them with comma and semicolon.

10 CLS 
20 INPUT "DAY"; D 
30 INPUT "MONTH"; M 
40 INPUT "YEAR"; Y 
50 PRINT D, M, Y 
60 PRINT D; M; Y 
70 END

Question 53
Write a BASIC program to input the amount of money in US Dollars and find and display it in Indian rupees, when 1 US Dollar = ₹89.

10 CLS 
20 INPUT "ENTER AMOUNT IN US DOLLARS"; D 
30 LET INR = D * 89 
40 PRINT "INDIAN RUPEES = "; INR 
50 END

Question 54
Write a BASIC program to input the values of A and B and find and display the result of (A + B)2.

10 CLS 
20 INPUT "VALUE OF A"; A 
30 INPUT "VALUE OF B"; B 
40 LET R = (A + B) ^ 2 
50 PRINT "RESULT = "; R 
60 END

Question 55
Write a BASIC program to input the values of A and B and find and display the sum of square of A and cube of B.

10 CLS 
20 INPUT "VALUE OF A"; A 
30 INPUT "VALUE OF B"; B 
40 LET R = A ^ 2 + B ^ 3 
50 PRINT "RESULT = "; R 
60 END

Question 56
Write a BASIC program to input a character from the user and display the pattern as shown in the example below:
Example:
INPUT: $
OUTPUT:
$
$$
$$$
$$$$

10 CLS 
20 INPUT "ENTER THE CHARACTER"; C$ 
30 PRINT C$ 
40 PRINT C$; C$ 
50 PRINT C$; C$; C$ 
60 PRINT C$; C$; C$; C$ 
70 END

Question 57
Write a BASIC program to input the length and the breadth (in meters) of a rectangular field. Find and display the cost of fencing the field if fencing rate is ₹12 per meter.

10 CLS
20 INPUT "LENGTH IN METER"; L
30 INPUT "BREADTH IN METER"; B
40 LET P = 2 * (L + B)
50 LET C = P * 12
60 PRINT "FENCING COST = "; C
70 END

Question 58
Write a BASIC program to input a person’s height in meters and weight in kg. Find and display the BMI (Body Mass Index) using the formula:
BMI Formula

10 CLS 
20 INPUT "HEIGHT IN METERS"; H 
30 INPUT "WEIGHT IN KG"; W 
40 LET BMI = W / H ^ 2 
50 PRINT "BMI = "; BMI 
60 END

Question 59
A shopkeeper offers 20% discount on the total bill. Write a BASIC program to input the total bill and find and display the final bill to be paid by the customer.

10 CLS 
20 INPUT "TOTAL BILL"; B 
30 LET D = 20 / 100 * B 
40 LET FB = B – D 
50 PRINT "FINAL BILL = "; FB 
60 END

Question 60
In a class, 20% of the students are absent. Write a program to find and display the number of students present if the total strength of the class is 45.

10 CLS 
20 LET T = 45 
30 LET A = 20 / 100 * T 
40 LET P = T – A 
50 PRINT "NUMBER OF STUDENTS PRESENT = "; P 
60 END