How to solve AssertionError ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to solve AssertionError ?

assert make_dot_string(90)=='0' assert make _dot_string(180)=='0'

17th Jul 2018, 12:35 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
23 Answers
+ 1
Could you share the full code?
17th Jul 2018, 12:45 PM
Satyam
+ 1
check this https://code.sololearn.com/cqgbsV01GrvU/?ref=app Could you tell me what you are wanting your program to do?
17th Jul 2018, 1:08 PM
Satyam
+ 1
it doesn't give me an AssertionError in my code, but it says Time Limit Exceeded.
17th Jul 2018, 1:15 PM
Satyam
+ 1
Simply comment the assert statements!
17th Jul 2018, 1:18 PM
Satyam
+ 1
remove the assert statements.
17th Jul 2018, 1:34 PM
Satyam
+ 1
It exceeded because the program took too long for the SoloLearn servers to completely process.
17th Jul 2018, 1:38 PM
Satyam
+ 1
Try the code in your PC's Python IDE.
17th Jul 2018, 1:38 PM
Satyam
+ 1
yeah it's correct
17th Jul 2018, 1:38 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
+ 1
it works on your laptop?
17th Jul 2018, 1:41 PM
Satyam
+ 1
so what was the problem?
17th Jul 2018, 1:42 PM
Satyam
+ 1
problem solved?
17th Jul 2018, 1:48 PM
Satyam
+ 1
yeah thank you sir
17th Jul 2018, 4:08 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
+ 1
lol i didn't even help you! Anyway, you're welcome!
17th Jul 2018, 4:30 PM
Satyam
+ 1
😊
17th Jul 2018, 4:31 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
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))
17th Jul 2018, 12:59 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
0
i want to print zeros horizontally with shaking
17th Jul 2018, 1:14 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
0
https://code.sololearn.com/c8O5qTajurgq It just printing, i don't want this output
17th Jul 2018, 1:17 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
0
I can't understand
17th Jul 2018, 1:27 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
0
thank you sir it's working
17th Jul 2018, 1:34 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar
0
python 3.4.3 in my system In online python IDE was shown time was exceed
17th Jul 2018, 1:36 PM
Rudra prakash Edamalapaati
Rudra prakash Edamalapaati - avatar