Syed: 1D Array

Syed: 1D Array

9th Grade

55 Qs

quiz-placeholder

Similar activities

array review

array review

9th - 12th Grade

60 Qs

Yr8 Assessment Point 1

Yr8 Assessment Point 1

9th - 12th Grade

50 Qs

JavaScript Basics: Introduction to Arrays

JavaScript Basics: Introduction to Arrays

9th Grade

50 Qs

FUNDAMENTAL in PROGRAMMING

FUNDAMENTAL in PROGRAMMING

1st - 10th Grade

52 Qs

Pretest in Basic Programming

Pretest in Basic Programming

9th Grade

50 Qs

VBIT I-II PYTHON QUIZ MID-1

VBIT I-II PYTHON QUIZ MID-1

9th - 12th Grade

60 Qs

Basic Java with CodeHS

Basic Java with CodeHS

9th - 12th Grade

50 Qs

Ôn tập KTGK2 Tin 11

Ôn tập KTGK2 Tin 11

9th - 12th Grade

50 Qs

Syed: 1D Array

Syed: 1D Array

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Syed M

Used 20+ times

FREE Resource

55 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 5 pts

What is an Array?

A data structure consisting of a collection of elements grouped under a single name.

  1. A collection of functions grouped under a single name.

  1. A variable that can store multiple data types simultaneously.

  1. A programming method used to iterate through data elements.

Answer explanation

A data structure consisting of a collection of elements grouped under a single name.

2.

DRAG AND DROP QUESTION

3 mins • 5 pts

Can an Array store values of different datatypes?

(a)  

Yes

No

Maybe

Not sure

Possibly

Answer explanation

No, an Array cannot store values of different datatypes as it requires all elements to be of the same type.

3.

MULTIPLE CHOICE QUESTION

3 mins • 5 pts

Guess the output.

names=["Lisa","Jane","William"]

print(names[1])

Lisa

Jane

William

Error

Answer explanation

The correct answer is Jane because names[1] accesses the element at index 1 in the list, which is 'Jane'.

4.

MULTIPLE CHOICE QUESTION

3 mins • 5 pts

What is the ouput?

DECLARE nums: ARRAY[0:4] OF INTEGER

nums ← [5, 10, 15, 20, 25]

OUTPUT(nums[2])

5

10

15

25

Answer explanation

The output is 15 because nums[2] refers to the element at index 2 in the array nums, which is 15.

5.

MULTIPLE CHOICE QUESTION

3 mins • 5 pts

If an array data contains five elements [5, 3, 7, 1, 9], what is the value of data[3]?

5

3

7

1

Answer explanation

The value of data[3] is 1 because array indexing starts at 0, so data[3] refers to the fourth element in the array which is 1.

6.

MULTIPLE SELECT QUESTION

3 mins • 5 pts

Which pseudocode initializes an array of size 10.

DECLARE nums: ARRAY[0:9] OF INTEGER

DECLARE nums: ARRAY[1:10] OF INTEGER

DECLARE nums: ARRAY[1:9] OF INTEGER

DECLARE nums: ARRAY[0:10] OF INTEGER

Answer explanation

The correct pseudocode to initialize an array of size 10 is DECLARE nums: ARRAY[0:9] OF INTEGER or DECLARE nums: ARRAY[1:10] OF INTEGER.

7.

MATH RESPONSE QUESTION

3 mins • 5 pts

How many elements are in the following array?

DECLARE items: ARRAY[0:4] OF STRING

items ← ["apple", "banana", "cherry", "date", "elderberry"]

Mathematical Equivalence

ON

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?