module 4 fns stk queue Python Programming Quiz

module 4 fns stk queue Python Programming Quiz

University

50 Qs

quiz-placeholder

Similar activities

Komputer

Komputer

University

48 Qs

Computer Architecture and Organization

Computer Architecture and Organization

University

55 Qs

FINAL EXAM - Info Mgt 2022

FINAL EXAM - Info Mgt 2022

University

50 Qs

Pre-Midterm Review Questions BSME-2A/2B/2C/2D

Pre-Midterm Review Questions BSME-2A/2B/2C/2D

University

55 Qs

Python Basic

Python Basic

University

50 Qs

application development

application development

University

50 Qs

Final Exam PKB

Final Exam PKB

University

50 Qs

Software Engineering pt1

Software Engineering pt1

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

Create a free account and access millions of resources

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?