Python Programming Quiz

Python Programming Quiz

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

Java Programming Quiz - unit 1b

Java Programming Quiz - unit 1b

9th Grade

20 Qs

Teste Diagnóstico 11º TI

Teste Diagnóstico 11º TI

11th Grade

10 Qs

Питон П411

Питон П411

9th - 12th Grade

20 Qs

Basic Python and Console Interaction Quiz

Basic Python and Console Interaction Quiz

11th Grade

20 Qs

Python Library Routines Quiz

Python Library Routines Quiz

10th Grade - University

18 Qs

Python Basics Quiz for Year 9

Python Basics Quiz for Year 9

9th Grade

20 Qs

Kuis Tipe Data dan Variabel

Kuis Tipe Data dan Variabel

10th Grade

10 Qs

Syntax Dasar C++ #1

Syntax Dasar C++ #1

11th Grade

10 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Information Technology (IT)

9th - 12th Grade

Hard

Created by

Fadi Fadi

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? python Copy x = 5 y = 10 z = x + y print(z)

15

5

10

50

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly assigns the value 10 to a variable a?

a = 10

10 = a

a := 10

a < 10

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the data type of input() function's return value?

int

str

float

bool

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function would you use to convert a string "123" into an integer in Python?

float("123")

int("123")

str("123")

eval("123")

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? python Copy x = "5" y = int(x) + 10 print(y)

15

"510"

5

"15"

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following code will convert the user input into a floating-point number?

float(input())

int(input())

str(input())

eval(input())

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of x after executing the following code? python Copy x = "10" x = int(x) + 5

15

"105"

10

"15"

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?