Quiz 6

Quiz 6

University

10 Qs

quiz-placeholder

Similar activities

Python-Basic

Python-Basic

3rd Grade - University

15 Qs

Quiz -3: JavaScript & PHP (AIML)/CC/1st Year

Quiz -3: JavaScript & PHP (AIML)/CC/1st Year

University

15 Qs

Python introduction

Python introduction

University

15 Qs

Intro to Python

Intro to Python

KG - University

10 Qs

OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

PYTHON BASICS PART 1

PYTHON BASICS PART 1

University

10 Qs

Повторення пайтон3 панда

Повторення пайтон3 панда

University

9 Qs

Exploring Python: Input and Output Essentials

Exploring Python: Input and Output Essentials

9th Grade - University

10 Qs

Quiz 6

Quiz 6

Assessment

Quiz

Computers

University

Medium

Created by

Mohand Mahmoud

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

class Avoid:

def m1(self):

print('m1 in A')

class B(Avoid):

def m1(self):

print('m1 in B')

a = B()

a.m1()

m1 in A

m1 in B

m1 in A m1 in B

m1 in A m1 in A

2.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

methods can't return objects?

False

True

3.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

class Student:

def init(self,name):

self.name=name

stu =Student('ali')

print(stu.name)

ali

none

error

4.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

which of the following is not oop concopet?

Encapsulation

polymorphism

inherentiance

exception

5.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

class Home:

def init(self,name,HomeName):

self.name=name

self.HomeName=HomeName

x = Home()

x.homeName = 'Giza'

print(x.homeName)

Giza

Error

Home()

None

6.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

class Home:

def init(self,name,HomeName):

self.name=name

self.HomeName=HomeName

x = Home("Ahmed","Giza")

print(x.HomeName)

Giza

None

Error

Ahmed Giza Giza

7.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

import datetime

x = datetime.datetime.now()

print(x.year)

2023

7

4

4\7\2023

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?