- 28
Fill in the blanks to make the egg attribute strongly private and access it from outside of the class
class Test: __egg = 7 t = Test() print(t._Test_____)
42 Answers
+ 8
Answer:
class Test:
__egg = 7
t = Test()
print(t._Test__egg)
+ 4
(Correct Answer)
class Test:
__egg = 7 for 1st (# Two underscores with egg)
print(t._test__egg) (# t. "underscore" test " underscore (2times) egg)
+ 1
class Test:
_ _ egg = 7
t = Test()
print(t._Test__egg)
0
please give the proper answer!..
0
can someone explain the answer?
0
Fill in the blanks to make the egg attribute strongly private and access it from outside of the class.
answer : class test:
__egg = 7
t = test()
print(t._test__egg)
0
This is the real answer:
class Test:
_ _ egg = 7
t = Test()
print(t. _ Test _ _ egg)
just place 1 underscore after 't.' then 2 underscores and egg on the last point.
0
Guys, I figured it out, you have to put 2 __ and then write egg yourself.
So you have to write it like this:
__egg
Then it works
0
class Test:
__egg = 7
t = Test()
print(t._Test__egg)
- 1
class.
class Test:
__egg = 7
t = Test()
print(t._Test __egg)
- 1
Guys this is answer
class Test:
_ _ egg = 7
t = Test()
print(t. _ Test _ _ egg)
- 2
class Test:
__egg = 7
t = Test()
print(t._Test__egg)
- 3
- 3
https://youtu.be/Tg4Du8eUFw8
full python tutorial link video
- 3
class.
class Test:
__egg = 7
t = Test()
print(t._Test __egg)
- 4
re
sub
0
num
- 4
_
_
__egg
- 4
All are kids so they don't give answers.
- 4
The answer is
class Test:
__egg = 7
t = Test()
print(t._Test_egg)