Search Header Logo

COMPUTER SCIENCE- PAPER 2

Authored by Acksilia Matsveru

Computers

11th Grade

COMPUTER SCIENCE- PAPER 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

Variables and constants are used for data storage in computer programs. Discuss the similarities and differences between these data stores.

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

A programmer is writing a program that stores data about items stored in a warehouse. Suggest suitable meaningful names and data types for: Item name, Number in stock, Reorder level, Whether the item is on order or not.

Evaluate responses using AI:

OFF

Answer explanation

Item name should be of type string, Number in stock and Reorder level should be of type integer, and Whether the item is on order or not should be of type boolean.

3.

OPEN ENDED QUESTION

3 mins • 1 pt

Programming concepts include: selection, totalling, counting. Describe each and provide an example of program code to show how it is used.

Evaluate responses using AI:

OFF

Answer explanation

Selection involves choosing between different paths based on conditions. Totalling is the summing of values. Counting is keeping track of occurrences. Example: Selection - if-else statement. Totalling - summing an array. Counting - counting occurrences in a list.

4.

OPEN ENDED QUESTION

3 mins • 1 pt

Programs can use both local and global variables. Describe, using examples, the difference between local and global variables.

Evaluate responses using AI:

OFF

Answer explanation

Local variables are declared within a specific function or block and can only be accessed within that scope. Global variables are declared outside of any function and can be accessed from anywhere in the program.

5.

OPEN ENDED QUESTION

3 mins • 1 pt

A two-dimensional array stores the first name and family name of fifteen people. Write a program in pseudocode to display the first name and family name of the fifteen people.

Evaluate responses using AI:

OFF

Answer explanation

Create a loop to iterate through the two-dimensional array and display the first name and family name of each person.

6.

OPEN ENDED QUESTION

3 mins • 1 pt

Extend your program to sort the ten names in order of family name before displaying the names.

Evaluate responses using AI:

OFF

Answer explanation

To sort the names by family name, you can split each name into first and last names, then sort based on the last name. This can be achieved by using string manipulation functions or regular expressions to extract the last name for sorting.

7.

OPEN ENDED QUESTION

3 mins • 1 pt

Describe the purpose of each statement in this algorithm. FOR I ← 1 TO 300, INPUT Name[I], NEXT I.

Evaluate responses using AI:

OFF

Answer explanation

The FOR loop iterates from 1 to 300, INPUT Name[I] stores input in array at index I, and NEXT I increments the loop counter.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?