Search Header Logo

Fundamentals of Programming Quiz

Authored by Kwasi Boafo-Asante

Computers

University

Used 2+ times

Fundamentals of Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to output "Hello, World!" in Python?

`echo "Hello, World!"`

`print("Hello, World!")`

`System.out.println("Hello, World!")`

`printf("Hello, World!")`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

`1variable`

`variable_1`

`variable-1`

`variable 1`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: `print(2 ** 3)`?

6

8

9

12

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following data types is immutable in Python?

List

Dictionary

Tuple

Set

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression `5 % 2` in Python?

0

1

2

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to define a block of code in Python?

Curly braces `{ }`

Parentheses `( )`

Indentation

Square brackets `[ ]`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the keyword used to define a function in Python?

`function`

`def`

`func`

`define`

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?