module 4 fns stk queue Python Programming Quiz

module 4 fns stk queue Python Programming Quiz

University

50 Qs

quiz-placeholder

Similar activities

ICT 201-250

ICT 201-250

University

50 Qs

TTL 1 22-23

TTL 1 22-23

University

55 Qs

2nd C Programming Quiz

2nd C Programming Quiz

University

50 Qs

Microsoft Excels: Formulas and Functions

Microsoft Excels: Formulas and Functions

12th Grade - University

45 Qs

RIA Revision for Class Test_Set 2

RIA Revision for Class Test_Set 2

University

50 Qs

desain grafis

desain grafis

12th Grade - University

50 Qs

Operating Systems I

Operating Systems I

10th Grade - University

45 Qs

PKB - 6

PKB - 6

University

55 Qs

module 4 fns stk queue Python Programming Quiz

module 4 fns stk queue Python Programming Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Vigneshwari S

FREE Resource

AI

Enhance your content in a minute

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

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a global variable in Python?

Defined inside a function

Defined outside all functions

Defined only in __main__

Must be declared using global

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed? x = 10 def show(): x = 5 print(x) show() print(x)

5 and 5

10 and 10

5 and 10

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to modify a global variable inside a function?

nonlocal

this

global

public

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which scope rule does Python follow for name resolution?

LIFO

LEGB

FIFO

OOP

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a variable is declared inside a function without global, it is:

Local

Global

Class variable

Static

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output? x = 100 def f(): global x x = 50 f() print(x)

100

50

Error

None

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does nonlocal keyword do?

Declares variable global

Declares variable local

Refers to enclosing function variable

Deletes a variable

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?

Discover more resources for Computers