1. UNISA
2. 2024
3. INF1511-24-Y
4. Welcome Message 2024 WELCOME TO INF1511 Visual Programming 2024 - The
module will commence on MONDAY 4 March 2024. the module leader for 2024 is Dr
Kgopa and the secondary lecturer is Ms Naidoo..
5. Assessment 6
QUIZ
Assessment 6
Open course index
Back
Time left 0:09:20
Question 1
Answer saved
Marked out of 1.00
Flag question
Question text
The procedure of _____ allows different methods with the same name in different classes to
perform different tasks.
a.polymorphism
b.metamorphism
c.heteromorphism
d.monomorphism
Clear my choice
Question 2
Answer saved
Marked out of 1.00
Flag question
Question text
The Python programming language provides an option for re-useable code in the form of
____
a.instances
b.objects
c.classes
d.orientations
Clear my choice
Question 3
, Answer saved
Marked out of 1.00
Flag question
Question text
Let A and B be objects of class Foo. Which functions are called when print(A + B) is
executed?
a.__str__(), __add__()
b.__str__(), __sum__()
c.__sum__(), __str__()
d.__add__(), __str__()
Clear my choice
Question 4
Answer saved
Marked out of 1.00
Flag question
Question text
What is the output from the execution of the following code?
class triangle:
#setting default values
def __init__(self, x=10, y=10):
self.__base=x
self.__height=y
def calc(self):
area=0.5*self.base*self.height
return (area)
#create an instance
myBase=int(input('Please enter the base length : '))
myHeight=int(input('Please enter the height : '))
myTri=triangle(myBase, myHeight)
print(myTri.base)
print(myTri.height)
myTri.calc()
a.error message
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying this summary from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller mabogwaneboitumelo724. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy this summary for R50,00. You're not tied to anything after your purchase.