Programming Basics Quiz

Programming Basics Quiz

12th Grade

38 Qs

quiz-placeholder

Similar activities

Tecnologías de la Información II

Tecnologías de la Información II

1st - 12th Grade

34 Qs

PTS 1_MYOB

PTS 1_MYOB

12th Grade

35 Qs

404

404

12th Grade

33 Qs

Computer Studies Quiz ok

Computer Studies Quiz ok

7th Grade - University

35 Qs

Empowerment of Technology Finals Exam

Empowerment of Technology Finals Exam

12th Grade

36 Qs

K-US-01

K-US-01

12th Grade

40 Qs

City and Guilds Award in Cloud Services

City and Guilds Award in Cloud Services

12th Grade

40 Qs

Excel kelas 8_40 Soal

Excel kelas 8_40 Soal

12th Grade

40 Qs

Programming Basics Quiz

Programming Basics Quiz

Assessment

Quiz

Computers

12th Grade

Easy

Created by

Teresa Gordon

Used 2+ times

FREE Resource

38 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the keyword used to start an if statement in programming?

for

while

if

switch

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In an if statement, what follows the keyword 'if'?

A semicolon

A condition or Boolean expression

A variable declaration

A function call

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the code body in an if statement?

To declare variables

To execute code if the condition is true

To define functions

To import libraries

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet if `isHeads` is set to `true`?

It's heads! You win!

It's tails! You lose!

Error: `isHeads` is not defined

No output

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code snippet if `isHeads` is set to `false`?

A) It's heads! You win!

B) It's tails! You lose!

C) No output

D) Syntax error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to start an if-else statement in programming?

for

while

if

switch

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the condition in an if-else statement?

To repeat a block of code

To check if a block of code should be executed

To define a function

To declare a variable

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?