F&A Diskussionen
following my first comment
1 Stimme
3 Antwortencan 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 Stimme
6 Antwortenoutputs array
0 Stimmen
2 Antwortenwhats the anwser
0 Stimmen
3 AntwortenIn the code below the output is 2. This code is used in a challenge and I get an error when I select the answer 2. It accepts as correct the answer 1 which I believe is wrong. If you agree please thumbs up.
If you find any other errors please post them here!
#include <iostream>
using namespace std;
int main()
{
for(int i=1; i>=1; i++) {
if(i<1 || i>1){
cout << i;
break;
}
}
return 0;
}
8 Stimmen
8 Antwortenhow to use clock() in c?
0 Stimmen
1 AntwortGoogle teachable machine
0 Stimmen
1 AntwortHeute heiß
What's wrong in my code?
4 Votes
App Development
1 Votes
GUI-Based Python code in Webpage
3 Votes
My Missing Courses
1 Votes
Are '\0' and NULL the same?
1 Votes
cyber security
0 Votes
career in cybersecurity
0 Votes
Number addition
0 Votes