Coding Quiz Zone
前往频道在 Telegram
✨ Part Of @OfficialCodingExpert Dive into the world of computer science, programming, and coding challenges. Sharpen your skills, expand your knowledge, and embark on a journey of continuous learning. Stay tuned for daily quizzes!
显示更多1 552
订阅者
-424 小时
+17 天
-130 天
帖子存档
1 552
What will be the output of the following Python code?
print("abcdef".center(7, 1))x
1 552
What will be the output of the following Python code?
print('*', "abcdef".center(7), '*')
1 552
What will be the output of the following Python code?
print("abcdef".center(0))
1 552
What will be the output of the following Python code?
print("abcdef".center())
1 552
What will be the output of the following Python code?
print("abc. DEF".capitalize())
1 552
What will be the output of the following Python code?
print("abc DEF".capitalize())
1 552
Suppose x is 345.3546, what is format(x, “10.3f”) (_ indicates space).
1 552
class Name:
def __init__(self, firstName, mi, lastName):
self.firstName = firstName
self.mi = mi
self.lastName = lastName
firstName = "John"
name = Name(firstName, 'F', "Smith")
firstName = "Peter"
name.lastName = "Pan"
print(name.firstName, name.lastName)1 552
class Count:
def __init__(self, count = 0):
self.__count = count
c1 = Count(2)
c2 = Count(2)
print(id(c1) == id(c2), end = " ")
s1 = "Good"
s2 = "Good"
print(id(s1) == id(s2))1 552
To check whether string s1 contains another string s2, use ________
1 552
If a class defines the __str__(self) method, for an object obj for the class, you can use which command to invoke the __str__ method.
1 552
To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed)?
1 552
Which of the following element is used to create any shape that consists of only straight lines?
