Python Variables and Scope

Python Variables and Scope

12th Grade

9 Qs

quiz-placeholder

Similar activities

Functions & NameSpace in Python -1

Functions & NameSpace in Python -1

12th Grade

10 Qs

básico de Code

básico de Code

10th - 12th Grade

14 Qs

python-BTxâu

python-BTxâu

9th - 12th Grade

10 Qs

Quiz Jaringan Nirkabel

Quiz Jaringan Nirkabel

5th Grade - University

12 Qs

Internet & Communications

Internet & Communications

11th - 12th Grade

12 Qs

สอบเก็บคะแนน ไพทอน ม.4

สอบเก็บคะแนน ไพทอน ม.4

9th - 12th Grade

10 Qs

BAB 1 INFORMATIKA

BAB 1 INFORMATIKA

9th - 12th Grade

10 Qs

Python Variables and Scope

Python Variables and Scope

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Amy Austin

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...

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are variables that are created outside of a function known as?

Local variables

External variables

Global variables

Internal variables

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where can global variables be used?

Only inside functions

Only outside functions

Both inside and outside of functions

Nowhere

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a variable with the same name is created inside a function, what is the scope of this variable?

Global

Local

External

Universal

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens to the global variable when a local variable with the same name is used inside a function?

The global variable is overwritten

The global variable is deleted

The global variable remains unchanged

The global variable becomes local

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used in Python to refer to a global variable inside a function if you want to change its value?

local

var

global

nonlocal

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the print statement in the provided Python code example?

Python is awesome

Python is fantastic

Python is x

Python is

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a type of certificate offered by the website shown in the image?

HTML Certificate

CSS Certificate

C Certificate

JavaScript Certificate

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?