GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

A hypothetical class called “MyClass” has a method called ‘E…

A hypothetical class called “MyClass” has a method called ‘Equals’ with this signature line: def equals (self, in_obj): What code should be added to that method to check whether the input object is the same object as the MyClass object in which the method is being executed?

Read Details

For the code below, what are the overridden method(s) (check…

For the code below, what are the overridden method(s) (check all that apply)?: class Employee (object):         def __init__(self, name, email):                  self.name = name                  self.email = email         def chgEmail (self, newEmail):                  self.email = newEmail + ‘.com’                  return True   class Manager (Employee):           def __init__(self, name, email, salary):                  super().__init__(name, email)                  self.salary = salary        def chgEmail(self, newEmail):                 self.email = newEmail   class Worker (Employee):            def __init__(self, name, email, hourly):                 super().__init__(name, email)                 self.hourly = hourly           # executable code that follows the code above: e1 = Employee (‘John Miller’, ‘jMiller@gmail.com’) e2 = Employee (‘Jane Bradley’, ‘jbradley@tesla.com’) w1 = Worker   (‘Karina Schmidt’, ‘kschmidt@tesla’, 18.50) w2 = Worker   (‘Juan MacMaster’, ‘jmacmaster@gmail.com’, ‘17.25’) m1 = Manager  (‘Elon Musk’, ’emusk@tesla.com’, 650000) m2 = Manager  (‘Erica Contreras’, ‘econtreras@gmail.com’, 110000)

Read Details

With regards to comma separated value files such as .csv and…

With regards to comma separated value files such as .csv and .tsv, what is a delimiter? Top of Form

Read Details

What do you understand by CRUD operations

What do you understand by CRUD operations

Read Details

What will this code print? ”’ class Demo:    def __enter__(…

What will this code print? ”’ class Demo:    def __enter__(self):        print(“Enter”)        return self    def __exit__(self, *args):        print(“Exit”) with Demo():    print(“Inside”) ”’

Read Details

What does .throw() do in a Python generator?

What does .throw() do in a Python generator?

Read Details

What do you understand about the between the 3 relationships…

What do you understand about the between the 3 relationships – Composition, Association and Aggregation ? Give ONE example for each type of relationship.  Which one shows a tight relationship between objects and which one shows a loose relationship between its objects.   

Read Details

Iterators support the iter() function 

Iterators support the iter() function 

Read Details

Iterators support the iter() function

Iterators support the iter() function

Read Details

When you use a yield statement in a generator function, it c…

When you use a yield statement in a generator function, it causes the function execution to be (skipped / aborted / suspended), returning the yielded value to the caller.

Read Details

Posts pagination

Newer posts 1 … 25,942 25,943 25,944 25,945 25,946 … 98,742 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top