AS Level Computer Science 26.07.2021 Paper
AS Level Computer Science 26.07.2021 Paper
Date: 26.07.2021
Total Marks: 60
10.00 am to 11.30 am
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
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>
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
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
Page 3 of 3