Python Coding Quiz

Python Coding Quiz

10th Grade

39 Qs

quiz-placeholder

Similar activities

2da de Recuperación de Programación

2da de Recuperación de Programación

9th - 12th Grade

35 Qs

tin học 10

tin học 10

10th Grade

37 Qs

Programming Final Exam

Programming Final Exam

9th - 12th Grade

40 Qs

II razred (kraj godine)

II razred (kraj godine)

9th - 12th Grade

40 Qs

Python procedures and functions

Python procedures and functions

8th - 10th Grade

35 Qs

Tin 10

Tin 10

10th Grade

37 Qs

Quiz informatica 3°

Quiz informatica 3°

10th Grade

34 Qs

Python. СР-1

Python. СР-1

7th - 10th Grade

37 Qs

Python Coding Quiz

Python Coding Quiz

Assessment

Quiz

Computers

10th Grade

Medium

Created by

Jason Cross

Used 2+ times

FREE Resource

39 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

`def functionName:`

`def functionName():`

`function functionName():`

`function functionName:`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

`2variable`

`variable-2`

`variable_2`

`variable 2`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? ```python print(2 + 3 * 4) ```

`20`

`14`

`24`

`9`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to create a comment in Python?

`// This is a comment`

`/* This is a comment */`

`# This is a comment`

``

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? ```python def add(a, b): return a + b print(add(2, 3)) ```

`2`

`3`

`5`

`None`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a conditional statement in Python?

`for`

`while`

`if`

`def`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? ```python x = 10 if x > 5: print("Greater") else: print("Smaller") ```

`Greater`

`Smaller`

`None`

`Error`

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?