Programming Basics Quiz

Programming Basics Quiz

12th Grade

38 Qs

quiz-placeholder

Similar activities

AutoCAD Final Exam

AutoCAD Final Exam

9th - 12th Grade

40 Qs

Sistema Operativo

Sistema Operativo

8th Grade - University

40 Qs

SDLC

SDLC

12th Grade

40 Qs

Win 10 Practice Test v1

Win 10 Practice Test v1

9th Grade - Professional Development

39 Qs

Latihan UAS TLJ Kelas XII SMK

Latihan UAS TLJ Kelas XII SMK

12th Grade

40 Qs

Web Dev MasterClass Day1

Web Dev MasterClass Day1

6th Grade - Professional Development

34 Qs

PARTS OF COMPUTER TEST

PARTS OF COMPUTER TEST

12th Grade

36 Qs

Excel

Excel

1st Grade - University

40 Qs

Programming Basics Quiz

Programming Basics Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Easy

Created by

Teresa Gordon

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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?