Search Header Logo

Basic Programming Concepts Quiz

Authored by Gabriel Silveira

Engineering

8th Grade

Used 4+ times

Basic Programming Concepts Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function is used to convert string values to integers?

int()

str()

float()

bool()

2.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

What sequence is used to create a newline at the end of statements?

3.

OPEN ENDED QUESTION

3 mins • 1 pt

Construct a block of code that asks the user for a number and prints three times that number. There is extra code to watch out for.

Evaluate responses using AI:

OFF

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to convert an integer to a string in Python?

int()

float()

list()

str()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of int('42') in Python?

42

'42'

4.2

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following will raise a ValueError in Python?

int('123')

int('abc')

int(True)

int(5.0)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Why will this code not run?

there has to be a number in the variable

there are supposed to be no spaces in the variable label

there are no caps in variables

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?