@LiuYongJie
2016-09-25T14:07:34.000000Z
字数 828
阅读 290
Liu Yongjie 2014301020094
1.Moving your English name horizontally on the screen.
2.Let figures spin.
Using python preliminarily.
Learning how to use matplotlib.
Code:
import os
import time
i=os.system('cls')
a0 = " # "
a1 = " # "
a2 = " # "
a3 = " # "
a4 = " # ## # # "
a5 = " # # # # # "
a6 = "# # # # # # "
a7 = "# # # # # # "
a8 = " # # ## # # "
a9 = " # # "
a10 = " # # "
a11 = " ### "
b = 0
while b < 20:
print (' '*b+a0)
print (' '*b+a1)
print (' '*b+a2)
print (' '*b+a3)
print (' '*b+a4)
print (' '*b+a5)
print (' '*b+a6)
print (' '*b+a7)
print (' '*b+a8)
print (' '*b+a9)
print (' '*b+a10)
print (' '*b+a11)
time.sleep(1)
i=os.system('cls')
b += 1
Code:
Result:
Conclusion
This exercise is much more difficult than last one,but also much more interesting.
After this exercise,I can use python a little more adroitly,and I've learnt more grammar about python.
Matplotlib is really useful in physics studing.