Skip to content

Instantly share code, notes, and snippets.

@ranlix
Last active December 19, 2015 16:19
Show Gist options
  • Save ranlix/5983386 to your computer and use it in GitHub Desktop.
Save ranlix/5983386 to your computer and use it in GitHub Desktop.
page61
# -*- conding:utf-8 -*-
import math
import calendar
#1.a)
math.abs(-4.3)
#1.b)进一法是嘛?ceil?
math.ceil(math.sin(34.5))
#2.a)
def nextleap(year):
while 1:
year += 1
if calendar.isleap(year):
break
return year
#2.d)
calendar.leapdays(2000, 2050)
#2.e)
calendar.weekday(2016, 7, 29)
#3.a:
s.title()
#3.b
a.index("2")
a.find('2')
#3.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment