Search Header Logo

Fundamentals of Programming Quiz

Authored by J Blakley

Information Technology (IT)

8th Grade

Used 1+ 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

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

2ndNumber

number_2

number-2

number 2

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type would you use to store the value "Hello, World!" in Python?

Integer

String

Boolean

Float

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a control structure used to repeat a block of code?

if statement

for loop

variable assignment

function definition

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? ```python x = 5 print(x * 2) ```

7

10

25

52

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid data type in Python?

float

string

letter

boolean

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to define a function in Python?

function myFunction():

def myFunction():

define myFunction():

func myFunction():

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following lists contains only integers?

[1, 2, 3, 4]

[1, "2", 3, 4]

[1.0, 2, 3, 4]

["one", "two", "three", "four"]

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?