AITT LAB QUIZ  4

AITT LAB QUIZ 4

University

10 Qs

quiz-placeholder

Similar activities

Python_IOSC

Python_IOSC

University

15 Qs

PE2 Module 3

PE2 Module 3

KG - Professional Development

11 Qs

Quiz 5

Quiz 5

University

11 Qs

GRADE 10 ТЖБ

GRADE 10 ТЖБ

University

9 Qs

Learn Python 3 - Lesson 10 Introduction to Classes

Learn Python 3 - Lesson 10 Introduction to Classes

11th Grade - Professional Development

7 Qs

CodeHS - Intro to Python - Conditionals Quiz

CodeHS - Intro to Python - Conditionals Quiz

9th Grade - Professional Development

15 Qs

HCI 584 Python quiz

HCI 584 Python quiz

University

15 Qs

Round 1 (Tech Utsav)

Round 1 (Tech Utsav)

University

15 Qs

AITT LAB QUIZ  4

AITT LAB QUIZ 4

Assessment

Quiz

Computers

University

Hard

Created by

bhuvana medicherla

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

The output of:

def hello(a,b):

    print("How are you?")

hello(1,2)    is?

1 2

How are you?

How are you? 1 2

None

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

The body of the class consists of:

Objects

Constructors

Attributes

None

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Encapsulation is a combination of:

Objects and Variables

Classes and Objects

Methods and Variables

None

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In the following code:

class demo:

    a=10

    def greet(self):

        print("Hello")

    print("Hi")

d= demo()

d.greet()

the constructor is:

demo

greet

greet(self)

None

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

In Inheritance:

A->B, where A is super class or base class and B is subclass, the this is called:

Multiple Inheritance

Multilevel inheritance

Single Inheritance

Hierarchical Inheritance

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

The following code is an example of:

class A:

    a=10

class B:

    b=20

class C(A,B):

    c=30

c= C()

print(c.a,c.b,c.c)

Error

30

10 20 30

None of the above

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In the following code:

class Circle:

    def init(self,pi):

        self.pi = pi

    def calc_area(self,radius):

        return self.pi*radius**2

C1=Circle(3.14)

print('The area of Circle is ',C1.calc_area(5))

the instance variable is initialized with what  value?

5

3.14

2

None of the above

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?