Grade 10 ComputerApplications FA1 PP2 2025-26 AK
Grade 10 ComputerApplications FA1 PP2 2025-26 AK
(One hour)
Formative Assessment – 1, 2025-26
GRADE: X Max. Marks: 50
Question 1
Choose the correct option: [10]
(i) Pick the odd one out
a. charAt( )
b. isUpperCase( )
c. startsWith( )
d. equals( )
(ii) Identify punctuator from the below example :
b = e + f * 20;
a. ;
b. *
c. +
d. =
(iii) Which of the following is an invalid literal ?
ICSE 2
(viii) ________ is a name given to variable, method, class, package
a. Keyword
b. Operator
c. Identifier
d. Literal
(ix) What will be the output of
System.out.println(Integer.valueOf(”a”));
a. 65
b. a
c. 97
d. NumberFormatException
(x) Assertion (A) : Implicit type conversion automatically converts the smaller
datatype to appropriate larger datatype needed in the expression.
Reason (R) : No data loss can occur in implicit type casting.
a. Both assertion(A) and Reason(R) are correct and Reason (R) is
correct explanation of Assertion.
b. Both assertion(A) and Reason(R) are correct but Reason (R) is not
the correct explanation of Assertion.
c. Assertion (A) is true Reason(R ) is false.
d. Assertion (A) is false Reason(R ) is true.
Question 2 Answer the following
Question 3 [15]
Define a class to input a string and convert it into uppercase and print the pair of
vowels and number of pair of vowels occurring in the string.
Example:
Input:
“BEAUTIFUL BUTTERFLIES”
Output: EA, AU, IE
ICSE 4
No. of pair of vowels: 3
Ans:
import java.util.Scanner;
class DoubleLetter
{
public static void main(String args[])
{
Scanner SC= new Scanner(System.in);
String input;
char ch1,ch2;
int i,l,c=0;
System.out.println("Enter a String:");
input= SC.nextLine();
input= input.toUpperCase();
l =input.length();
for(i=0;i<l-1;i++)
{
ch1=input.charAt(i);
ch2= input.charAt(i+1);
if("AEIOU".indexOf(ch1)>=0 && "AEIOU".indexOf(ch2)>=0)
{ System.out.println(ch1+ch2);
c++; }
}
System.out.println("No of pairs of vowels="+c);
}
Question 4 [15]
Write a program in java to input 10 characters and find the frequency of uppercase
and lowercase characters separately and concatenate only those characters which are
either a letter or a digit
For example:
Input: A, #, 1, b, c, d, E, F, %, H
Output:
Uppercase Frequency: 4
Lowercase Frequency: 3
Concatenated String : #1%
Question 5 [15]
Write a program to accept a sentence and print only the first letter of each word of the
sentence in capital letters separated by a full stop.
Example :
Input : “This is a cat”
Output : T.I.A.C.
Ans:
import java.util.Scanner;
public class Prog5 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ICSE 6
System.out.print("Enter a sentence: ");
String sentence = sc.nextLine();
}
}
System.out.println(result);
}
}
************************