Python Indentation and PEP 8 Quiz

Python Indentation and PEP 8 Quiz

1st Grade

15 Qs

quiz-placeholder

Similar activities

I Can Code!

I Can Code!

KG - University

10 Qs

Grade 1 T3 Practice Review

Grade 1 T3 Practice Review

1st Grade

10 Qs

Let's test your typing & keyboard skills

Let's test your typing & keyboard skills

1st - 2nd Grade

18 Qs

Python Basics

Python Basics

KG - University

15 Qs

My Computer Knowledge

My Computer Knowledge

1st - 3rd Grade

10 Qs

Scope of Variables in Python

Scope of Variables in Python

1st Grade - Professional Development

15 Qs

Loops

Loops

1st - 12th Grade

20 Qs

Programming - Algorithms in Pseudocode & Flow Diagrams

Programming - Algorithms in Pseudocode & Flow Diagrams

1st - 12th Grade

10 Qs

Python Indentation and PEP 8 Quiz

Python Indentation and PEP 8 Quiz

Assessment

Quiz

Computers

1st Grade

Easy

Created by

Adham Elmuntser

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the maximum recommended line length in Python according to PEP 8?

50 characters

79 characters

100 characters

120 characters

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does consistent indentation help with in Python code?

Making the code colorful

Improving readability

Adding more functions

Increasing execution speed

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an example of a bad indentation practice?

Using 4 spaces

Using inconsistent spaces

Using comments

Using functions

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why should lines be limited to 79 characters in Python?

To make the code colorful

To improve readability

To add more comments

To increase speed

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an example of a good indentation practice?

Using 2 spaces

Using 4 spaces

Using tabs

Using no spaces

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How should imports be organized in code?

On separate lines

All on one line

In random order

Without any order

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the naming convention for variable and function names?

CamelCase

snake_case

UPPERCASE

lowercase

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?

Discover more resources for Computers