Royce
796 posts


@Python_Dv 2**(3**2) #3**2 = 9, 2**9 = 512.
(2**3)**2 #2**3 = 8, 2**8 = 64.
2**3**2 # 3**2 = 9, 2**9 = 512
A) 512 64 512

@IvankaNews_ Yes,taking pride in bad morals is unacceptable behaviour in the school and church environment.
English

@IvankaNews_ Start with Chuck Schumer, John Fetterman and Angus King spicing the meal up with some chillie. Go girl enjoy.
English

Fastjet Zimbabwe has apologised to its customers for recent flight delays and service disruptions, pledging to take corrective measures. heraldonline.co.zw/fastjet-apolog…
English


BREAKING: Elon Musk's SpaceX set to win $2 billion Pentagon Satellite Deal to develop satellites that can track missiles and aircraft under President Trump's Golden Dome project, as per WSJ.
There is no official confirmation from @elonmusk and SpaceX yet.
English

@IvankaNews_ No, investment into farming is a big benefit to the country. It's a win - win situation.
English

@Python_Dv List = [1, 0, 2]
a, b, c = List[::-1]
print(List[b])
B) 1
# using List[::-1] reverses the list [2, 0, 1]
print List[b] , b has the value 0
result List[0] is now 1
English

Python Question / Quiz;
What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇
#python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #ai #ml #machinelearning #datascience

English

@Python_Dv List1 = [10, 20, 30, 40, 50]
List2 = [n%30 for n in List1]
print(List2)
D) [10, 20, 0, 10, 20]
(the remainder of n divided by 30).
# List1 = [10, 20, 30, 40, 50]
List2 = [n%30 for n in List1]
print(List2)
D) [10, 20, 0, 10, 20]
English

Python Question / Quiz;
What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇
#python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #ai #ml #machinelearning #datascience

English

@Python_Dv List = ['python', 'developers']
result = [i for i in List if len(i)>6]
print(*result)
B) developers
# developers meets the if len(i)>6 condition developers(10) so prints developers
English

Python Question / Quiz;
What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇
#python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #ai #ml #machinelearning #datascience

English

@Python_Dv class Test:
def __init__(self, __id):
self.__id = 101
test = Test(102)
D) ERROR.
When you define an attribute with double underscores(__id), python changes the name to _Test__id to avoid name clashes in subclasses so you get an error.
print(test.__id)
English

Python Question / Quiz;
What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇
#python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #ai #ml #machinelearning #datascience

English



