A simple way to import a built-in module in the Python!
- import
datetime
- import
calendar
-
-
- cal = calendar.month(2016,2)
- print
"Time is flying!!"
- print
"**********************"
- print
cal
- print
"**********************"
-
- today = datetime.date.today()
- print
"Today is",
today
- print
"Make everyday count!"
- #ending
Time
is flying!!
**********************
February 2016
Mo
Tu We Th Fr Sa Su
1
2 3 4
5 6 7
8 9 10
11 12 13 14
15
16 17 18 19 20 21
22
23 24 25 26 27 28
29
**********************
Today
is 2016-02-02
Make
everyday count!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Goals:
- Your hero must survive.
- Under 4 statements
Code:
while True:
enemy = self.findNearestEnemy()
self.attack(enemy)
self.attack(enemy)
No comments:
Post a Comment