0% found this document useful (0 votes)
3 views3 pages

AS Level Computer Science 26.07.2021 Paper

The document is an examination paper for the General Certificate of Education Subsidiary Level and Advanced Level in Computer Science, dated July 26, 2021. It contains instructions for the exam and four programming tasks that require writing Python programs to check special numbers, store Morse code, manage contact information, and analyze student step data in arrays. The total marks for the exam are 60, and the exam duration is 1 hour and 30 minutes.
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)
3 views3 pages

AS Level Computer Science 26.07.2021 Paper

The document is an examination paper for the General Certificate of Education Subsidiary Level and Advanced Level in Computer Science, dated July 26, 2021. It contains instructions for the exam and four programming tasks that require writing Python programs to check special numbers, store Morse code, manage contact information, and analyze student step data in arrays. The total marks for the exam are 60, and the exam duration is 1 hour and 30 minutes.
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/ 3

General Certificate of Education Subsidiary Level and Advanced Level

FIRST TERM EXAM

COMPUTER SCIENCE AS-LEVEL

Date: 26.07.2021
Total Marks: 60
10.00 am to 11.30 am

READ THESE INSTRUCTIONS FIRST

• Write your name on all the work you hand in.


• Write in dark blue or black pen.
• You may use a soft pencil for any diagrams, graphs or rough working.
• Do not use staples, paper clips, highlighters, glue or correction fluid.
• Answer all questions.
• At the end of the examination, fasten all your work securely together.
• The number of marks is given in brackets [ ] at the end of each question or part
question.

This question paper consists of 3 pages.

Page 1 of 3
1. Write a Program in Python to input a 6 digit number and check whether it is a Special
Number or not.
Note: Here a Special number satisfies 3 conditions
• It is a positive integer
• Does not have 0’s in it
• And no duplicate digits(that is every digit appears only once)
For example 754392, 192435 are all Special numbers whereas 33, 3121, 300 are
not. Hint: Keep separate counter variables for 0-9

2. We have seen applications of 1D array in storing data. Let’s use it to store morse code

Task 1: Create a Single Dimensional array to input the Morse code for all the alphabets from A-Z
and store in the array with memory indexes as shown below

65 ..-.
66 -.-.

90 --..

Task 2: Input your name, convert it to capital letters and display the morse code for the same
from the array in Task 1

Hint: ASCII A-Z 65-90 , create an array of size 100

3. A global 1D array called Contact of type STRING is used to store a list of names and email
addresses. There are 1000 elements in the array (Assume data is stored, so no need to input or
initialize). Each element stores one data item. The format of each data item is as follows:

<Name>':'<EmailAddress>

Name and EmailAddress are both variable-length strings.

For example: "Wan Zhu:[email protected]"

Task 1: Write a program in python to input a name and display its corresponding mail id

Task 2: Write a program to display all those names and mail id’s which start with the letter ‘P’

Page 2 of 3
4. Write a program in python to initlialize a 2D array which stores information about the
number of steps each student walks, over a week

Sample as given below:

Arnav Chinmay Priyanka Khouseka Jayanth


Mon 4000 3547 3907 2000 4800
Tues ..
Wed ..
Thur ..
Fri ..
Sat ..

Task 1: Input data into the 2D array

Task 2: Find the total number of steps walked on each day of the week.

Task 3: Find the total number of steps walked by each student in the entire week. Display name
of the students along with the total number of steps for each student

Hint: create an array as student=[“Arnav”, “Chinmay”,”Priyanka”, “Khouseka”,”Jayanth

Page 3 of 3

You might also like