Python Coding Quiz

Python Coding Quiz

10th Grade

39 Qs

quiz-placeholder

Similar activities

MS office 2016

MS office 2016

1st Grade - Professional Development

40 Qs

J808 1.5 Planning tools

J808 1.5 Planning tools

10th - 11th Grade

35 Qs

Software Design Models: Waterfall and Iterative

Software Design Models: Waterfall and Iterative

8th Grade - University

44 Qs

Ulangan Harian 1 (struktur kontrol)

Ulangan Harian 1 (struktur kontrol)

10th Grade

35 Qs

PSAS INFORMATIKA Kelas X

PSAS INFORMATIKA Kelas X

10th Grade

40 Qs

SPM 2015

SPM 2015

7th Grade - University

34 Qs

UH INFORMATIKA KLS X AK 2

UH INFORMATIKA KLS X AK 2

10th Grade

40 Qs

BÀI TẬP CHƯƠNG III TIN HỌC 10

BÀI TẬP CHƯƠNG III TIN HỌC 10

10th Grade

44 Qs

Python Coding Quiz

Python Coding Quiz

Assessment

Quiz

Computers

10th Grade

Practice Problem

Medium

Created by

Jason Cross

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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`

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?