Q&A Discussies
What is wrong with
1 Stem
2 AntwoordenWhat's wrong in this??
3 Stemmen
5 AntwoordenExcel Index-Match not consistent?
0 Stemmen
1 Antwoordis this wrong?
0 Stemmen
1 AntwoordQuick feedback on error?
0 Stemmen
13 AntwoordenChecking if an item is in an list
2 Stemmen
1 Antwoordoutputs array
0 Stemmen
2 AntwoordenHow i can do in python?
2 Stemmen
1 AntwoordComo puedo mejorar este codigo
0 Stemmen
1 AntwoordWhy output is 4,9
2 Stemmen
3 AntwoordenHow to generate ?
0 Stemmen
1 Antwoordcan 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 Stem
6 AntwoordenWhat am I doing wrong?
0 Stemmen
3 AntwoordenWhy this code runs?:
nums = [4, 5, 6]
msg = "Numbers: {} {}". format(nums[0], nums[1], nums[2])
print(msg)
Numbers:4, 5.
Byt the code:
nums = [4, 5, 6]
msg = "Numbers: {} {} {} {}". format(nums[0], nums[1], nums[2])
print(msg)
leading to error?
IndexError: tuple index our of range
1 Stem
3 AntwoordenSwitch statement cases
1 Stem
1 Antwoord