Created
December 7, 2015 19:29
-
-
Save digioz/29b87faa4d8b720650bc to your computer and use it in GitHub Desktop.
Python Test 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sin, cos, radians | |
import sys | |
def make_dot_string(x): | |
return ' '*int(10*cos(radians(x))+10) + 'o' | |
assert make_dot_string(90) == ' o' | |
assert make_dot_string(180) == 'o' | |
def main(): | |
for i in range(1000000): | |
s = make_dot_string(i) | |
print(s) | |
if __name__ == "__main__": | |
sys.exit(int(main() or 0)) |
Thanks
Thanks for help, but i dont really get how it works
Take a look at this video. It walks you through it: https://youtu.be/uZGZNEyyeKs
thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks!