0% found this document useful (0 votes)
83 views6 pages

Grade 9 Computer Assignments - Guidelines - Term 2 (2025)

The document outlines the internal assessment assignments for Grade 9 Computer Applications at Lokhandwala Foundation School for the academic year 2024-2025, focusing on Java programming. It includes specific instructions for journal preparation, assignment submission deadlines, and a series of programming questions and tasks. Students are required to handwrite their answers and complete various programming exercises related to Java concepts.

Uploaded by

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

Grade 9 Computer Assignments - Guidelines - Term 2 (2025)

The document outlines the internal assessment assignments for Grade 9 Computer Applications at Lokhandwala Foundation School for the academic year 2024-2025, focusing on Java programming. It includes specific instructions for journal preparation, assignment submission deadlines, and a series of programming questions and tasks. Students are required to handwrite their answers and complete various programming exercises related to Java concepts.

Uploaded by

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

LOKHANDWALA FOUNDATION SCHOOL

INTERNAL ASSESSMENT (Term – II)


SUBJECT : COMPUTER APPLICATIONS ASSIGNMENTS
ACADEMIC YEAR 2024– 2025

GRADE 9

Topic :- JAVA PROGRAMMING

Instructions: (Use the first term journal if possible)


➢ The student is expected to use an A-4 size interleaved journal.
➢ The journal needs to be covered with a dark color tinted paper.
➢ On that cover – Name of the student, Class, division, roll no. academic
year 24-25 and Computer Applications Assignments is to be written.
➢ The student may write the programs in black or blue ink.
➢ Answers should be handwritten.
➢ Total questions - 15

Format for writing the answers:


✓ Question – should be printed and stuck on blank side
✓ Answer / Program – handwritten

Assignment submission last date : 27th January, 2025


Question 1.
Choose the correct answer :
(i) The expression which uses >= operator is known as:
(a) relational (b) logical (c) arithmetic (d) assigment

(ii) Ternary operator is ________ operator.


(a) logical (b) arithmetic (c) relational (d) condtional

(iii) Method that accepts a sentence is:


(a) next() (b) nextLine() (c) nextInt() (d) None

(iv) Name the type of error in the statement given below:


int r=100/0;
(a) Syntax (b) Runtime (c) Logical (d) None of the above

(v) for(k=1;k<=2;k++)
{ for(m=1;m<=4;m++)
{ System.out.println(m*2);
}
}
How many times the inner loop is executed?
(a) 4 times (b) 8 times (c) 2 times (d) 16 times

(vi) The keyword to jump out of the loop :


(a) continue (b) break (c) return (d) none

(vii) Among the following, which is a keyword :


(a) every (b) all (c) case (d) each
(viii) System.out.println(!(5>3 && 4>6 ));
(a) true (b) false (c) True (d) False
(ix) Choose the odd one.
(a) != (b) = = (c) || (d) <=

(x) The output of Math.round(6.6) + Math.ceil(3.4) is:


(a) 9.0 (b) 11.0 (c) 10 (d) 10.0
(xi) Assertion(A): In java statements written in lower case letter or upper case letter are
treated as the same.
Reason(R): Java is a case sensitive language.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct
explanation of Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct
explanation of Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true

Question 2.
Do as directed :
a. Classify the following as primitive or non-primitive datatypes:
(i) char (ii) arrays (iii) int (iv) object
b. Write the Java expression for the following :
√3𝑥 + 𝑥2
𝑎+𝑏
c. What is the value of y after evaluating the expression given below?
y+= ++y + y-- + -- y; when int y=8
d. Give the output of the following:
(i) Math.floor (-4.7)
(ii) Math.ceil(5.1) + Math.pow(3, 4)
Question 3.
Do as directed :
a. Write the output for the following:
System.out.println("Incredible"+ ‘\n’+"world");
b. Rewrite the following using ternary operator:if
(bill >10000)
discount = bill * 10.0/100;
else
discount = bill * 5.0/100;
c. Convert the following if else if construct into switch case:
if( var==1)
System.out.println("good");
else if(var==2)
System.out.println("better");
else if(var==3)
System.out.println("best");
else
System.out.println("invalid");
d. Identify and name the following tokens:
(i) public (ii) '@' (iii) == (iv) {} (v) int a;
e. Give the output of following code and mention how many times theloop
will execute?
int i;
for( i=5 ; i>=1 ;i--)
{
if(i%2 ==1)
continue;
System.out.print( i+ '' '');
}

Question 4.
A tech number has even number of digits. If the number is split in two equal
halves, then the square of sum of these halves is equal to the number itself.
Write a program to generate and print all four digits technumbers.
Example:
Consider the number 3025
Square of sum of the halves of 3025 = (30+25)2 = (55)2
= 3025 is a tech number.

Question 5.
Write a program to input a number and check and print whether it is a Pronic
number or not. (Pronic number is the number which is the productof two
consecutive integers)
Examples: 12 = 3 x 4
20 = 4 x 5
30 = 5 x 6
Question 6.
Write a program to print the sum of negative numbers, positive even numbers and
positive odd numbers from the list of N numbers entered bythe user. The list
terminates when the user enters 0 (zero).

Question 7.
Using the switch statement, write a menu driven program to:
(i) To find and display all the factors of a number input by the user
(including 1 and excluding number itself).
Example: Sample Input : n =15 Sample Output : 1,3, 5
(ii) To find and display the factorial of a number input by the user (the factorial
of a non– negative integer n, denoted by n!, is the product of allintegers less than
or equal to n. Example:
Sample Input : n =5 Sample Output :5! = 1×2×3×4×5 =120.
For an incorrect choice, an appropriate error message should be displayed.

Question 8.
Write a program to calculate and display the sum of the even numbers
in the range of A to B : Sample input : A = 4 and B = 12 then
Sum = 4 + 6 + 8 + 10 + 12

Question 9.
Write a program to accept a number and check and display whether it is an
Armstrong number or not. (Armstrong number is a number where sum of cube of
each digit is equal to the number).
Example :
Consider the number 153.
Sum of its digits is 13+53+33 = 153

Question 10.
WAP to accept a two digit number and check whether it is a Special two digit
number or not. A number is a Special two-digit number if sum of its digits +
product of the digits is equal to the number. E.g. 59 = 5+9 = 14 and 5*9=45.
14 + 45 = 59
Question 11.
Write a menu driven program to calculate and print the sum of the
following series according to user’s choice:
1. Sum (S) = 2 – 4 + 6 – 8 + ………. -20
2. Sum (s) = x + x + x + x + ………….. + x
2 5 8 11 20
(Value of x to be input by the user. )

Question 12.

Question 13.
Write a program to print the following pattern :
1
12
123
1234
12345
Question 14.
Write a program to print the following pattern :
ABCDE
ABCD
ABC
AB
A

Question 15.
Write a program to print the following pattern :
#
# @
# @ #
# @ # @

You might also like