0
How to solve AssertionError ?
assert make_dot_string(90)=='0' assert make _dot_string(180)=='0'
23 Réponses
+ 1
Could you share the full code?
+ 1
check this
https://code.sololearn.com/cqgbsV01GrvU/?ref=app
Could you tell me what you are wanting your program to do?
+ 1
it doesn't give me an AssertionError in my code, but it says Time Limit Exceeded.
+ 1
Simply comment the assert statements!
+ 1
remove the assert statements.
+ 1
It exceeded because the program took too long for the SoloLearn servers to completely process.
+ 1
Try the code in your PC's Python IDE.
+ 1
yeah it's correct
+ 1
it works on your laptop?
+ 1
so what was the problem?
+ 1
problem solved?
+ 1
yeah thank you sir
+ 1
lol i didn't even help you! Anyway, you're welcome!
+ 1
😊
0
from math import sin, cos, radians
import sys
def make_dot_string(x):
return ' '*int(10*cos(radians(x))+10)+'0'
assert make_dot_string(180) =='0'
assert make_dot_string(90) =='0'
def main():
for i in range(1000000):
s=make_dot_string(i)
print(s)
if __name__=="__main__":
sys.exit(int(main() or 0))
0
i want to print zeros horizontally with shaking
0
https://code.sololearn.com/c8O5qTajurgq
It just printing, i don't want this output
0
I can't understand
0
thank you sir it's working
0
python 3.4.3 in my system
In online python IDE was shown time was exceed