New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
can someone help..
what does this code means so it could have the output like on the example..
class SpecialString:
def __init__(self, cont):
self.cont = cont
def __gt__(self, other):
for index in range(len(other.cont)+1):
result = other.cont[:index] + ">" + self.cont
result += ">" + other.cont[index:]
print(result)
spam = SpecialString("spam")
eggs = SpecialString("eggs")
spam > eggs
1 Vote
5 AnswersWrite and test a program that solves quadratic equations. A
quadratic equation is an equation of the form ax2+ bx + c =0 ,where a,b and c are given coefficient and x is the unknown The coefficients are real number inputs ,so they should be declared of type float or double Since quadratic equations typically have two solutions ,use x1 and x2 for the solutions to be output These should be declared of type double to avoid inaccuracies from round-off error
-1 Vote
3 AnswersFactorial Output error
1 Vote
4 Answerswhat does void mean??
3 Votes
8 AnswersHot today
Roblox full version
0 Votes
Help me
1 Votes
What is the bug here??
0 Votes
Help!
1 Votes
What should I learn?
0 Votes
Ai and coding !!?
1 Votes