Calling Procedures

Calling Procedures

12th Grade

5 Qs

quiz-placeholder

Similar activities

AP Computer Science Principles Unit 7 Review

AP Computer Science Principles Unit 7 Review

9th - 12th Grade

8 Qs

AP CSP Code.org Unit 7

AP CSP Code.org Unit 7

9th - 12th Grade

8 Qs

AP Comp (POP Quiz)

AP Comp (POP Quiz)

9th - 12th Grade

7 Qs

Python Variables

Python Variables

7th - 12th Grade

10 Qs

Introduction to HTML/CSS Quiz 1: Overview and Setup

Introduction to HTML/CSS Quiz 1: Overview and Setup

6th - 12th Grade

10 Qs

WK 9 variable

WK 9 variable

12th Grade

10 Qs

AP CSP Data

AP CSP Data

10th - 12th Grade

6 Qs

Introduction to Information System

Introduction to Information System

12th Grade

10 Qs

Calling Procedures

Calling Procedures

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Diana Mousa

Used 8+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which one of the following is NOT an input to this procedure or an output from this procedure?

highGrade

passingGrade

count

testGrade

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What can replace “<missing condition>” so that the procedure will display true if both the temperature is between 80 and 95, inclusive, and it is sunny and will display false if it is raining?

The parameter “a” is the temperature. The parameter “b” is a Boolean, true if it is sunny and false if it is raining.

Examples:

  • mystery [90, true] would display “Pool Party on Flag Day ”

  • mystery [90, false] would display “Pool Party is Cancelled”

  • mystery [100, true] would display “Pool Party is Cancelled”

  • mystery [95, false] would display “Pool Party is Cancelled”

(a ≤ 80 ≥ 95) AND (b = true)

(a ≥ 80 ≤ 95) AND (b = true)

(a ≥ 80) AND (a ≤ 95) AND (b = true)

(a ≤ 80) AND (a ≥ 95) AND (b = true)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will the following procedure display where “num” can be any integer (e.g., 0, 1, 2, 3, 4 …) ?

All numbers from 0 to num

All numbers from 0 to num with the exclusion of numbers divisible by 5

All numbers from 1 to num

All numbers from 1 to num with the exclusion of numbers divisible by 5

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will the following call to the procedure display?


stressed

desserts

list1

backronym

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will price contain after running the following code segment?


[4, 8, 2, 12]

[20, 40, 10, 60]

[40, 80, 20, 120]

[20, 80, 10, 120]