Practice Project

Input Date:

Output of the week:

 

. 1 the while:
F = {. 1: [1,7,12,18,29,35,40,46,57,63,68,74,85,91,96], 2: [2,13,19,24 , 30,41,47,52,58,69,75,80,86,97] 3: [3,8,14,25,31,36,42,53,59,64,70,81,87 , 92, 98], 4: [9,15,20,26,37,43,48,54,65,71,76,82,93,99], 5: [4,10,21,27,32 , 38,49,55,60,66,77,83,88,94], 6: [5,11,16,22,33,39,44,50,61,67,72,78,89,95 ],. 7: [0,6,17,23,28,34,45,51,56,62,73,79,84,90]}
A = []
for I in Range (1800,2100):
IF I and I == 0. 4% 100% = 0:!
a.append (I)
elif == 0 I 400%:
a.append (I)
Print (A)
Nian = int (iNPUT ( 'enter year:' ))
the while nian not in the range (1800,2100):
nian = int (the iNPUT ( 'beyond the range, enter 1800 - a year between 2099:'))
IF 1900 <= nian <2000:
nian Nian-1900 =
for I1 in Range (1,8):
for I2 in F [I1]:
IF I2 == Nian:
I1 = J
BREAK
for K in A:
IF + K == Nian 1900:
Print (STR (Nian + 1900) + 'is a leap year')
Yue = int (INPUT ( 'Enter month:'))
the while Yue Not the Range in (1, 13):
yue = int (the iNPUT ( 'fool, you have a family calendar' + str (yue) + 'May it please re-enter:?'))
the y-= {1: 1, 2: 4, . 3: 4,4 &: 0,5: 2,6: 5,7: 0,8: 3,9: 6,10: 1,11: 4,12:}. 6
Y1 = Y [Yue]
RI = int ( input ( 'Please enter one day:'))
the while RI not in the Range (1,32):
RI = int (input ( 'fool,' + str (yue) + ' May have' + str (ri) + 'day it ? Please enter: '))
for K in A:
IF Nian == K + and 1900 (Yue Yue == ==. 1 or 2):
J = J. 1-
DATE J = Y1 + RI +
the while DATE>. 7:
=. 7-DATE DATE
DATE DATE =. 1-
IF DATE == 0:
Print (STR (Nian + 1900) + 'of' + str (yue) + 'month' + str (ri) + 'Day is Sunday ')
elif DATE == 1:
print (str (nian + 1900) + ' of' + str (yue) + 'month' + str (ri) + 'Day is Monday')
elif DATE == 2:
print (str (nian + 1900) + ' in '+ str (yue) +' month '+ str (ri) +' day is Tuesday ')
elif dATE == 3:
Print (str (nian + 1900) +' of '+ str (yue) +' months' + str (ri) + 'day is Wednesday')
elif dATE == 4:
Print (str (nian + 1900) + 'of' + str (yue) + 'month' + str (ri) + 'day is Thursday' )
elif dATE == 5:
Print (str (nian + 1900) + 'of' + str (yue) + 'month' + str (ri) + 'day is Friday')
elif dATE == 6:
Print (str ( nian + 1900) + 'of' + str (yue) + 'month' + str (ri) + 'day is Saturday')
IF nian and 1993 + 1900 == == yue 12 and RI == 5:
Print ( ' today is the birthday Oh Blackie ')!
IF nian and 1990 + 1900 == == yue RI == 10 and 23:

# painted heart-shaped arc
def hart_arc ():
for i in range(200):
turtle.right(1)
turtle.forward(2)

move_pen_position DEF (X, Y):
turtle.hideturtle () # hidden brush (first)
turtle.up () # pen
turtle.goto (x, y) # brush moves to the designated start coordinates (0,0 window center )
turtle.down () # write
turtle.showturtle () # show brush


love = 'I Love You' # input ( " Please enter the words confession, the default is 'the I Love by You':")
Signature = 'Mega' #input ( "Please sign your name, do not fill not displayed by default:")

IF == Love '':
Love = 'the I Love by you'

# initialize
turtle.setup (width = 800, height = 500) # window (canvas) size of the
turtle .color ( 'red', 'pink ') # pen color
turtle.pensize (3) # brush thickness
turtle.speed (1) # drawing speed
# brush initialization start coordinates
move_pen_position (x = 0, y = -180) # moving brush location
turtle.left (140) # 140 degree rotation to the left

turtle.begin_fill () # background fill mark position

# Videos heart-shaped linear (bottom left)
turtle.forward (224) # brush is moved forward, a length of 224
# Videos love arc
hart_arc () # left arcuate
turtle.left (120) # adjust the brush angle
hart_arc () # right arcuate
# Heart Videos linear (bottom right)
turtle.forward (224)

end turtle.end_fill () # background fill mark position

# written on the heart-shaped express words
move_pen_position (0,0) # express language position
turtle.hideturtle () # hidden brush
turtle. color ( '# CD5C5C', ' pink') # font color
# font: set the font size (font presence computer can be set) align: center-aligned
turtle.write (love, font = ( ' Arial', 30 , 'Bold'), align = left = "Center")

# Leave signed
IF signature = '!':
turtle.color ( 'Red', 'Pink')
the time.sleep (2)
move_pen_position (180, -180)
Turtle. hideturtle () # hidden brush
turtle.write (signature, font = ( ' Arial', 20), align="center")

# Click on the window to close the program
window = turtle.Screen ()
window.exitonclick ()


2000 elif <= Nian <2100:
Nian = Nian-2000
for I1 in Range (1,8):
for I2 in F [I1]:
IF I2 == Nian:
J = I1
BREAK
for K in A:
IF == K + 2000 nian:
Print (str (nian + 2000) + 'is a leap year')
yue = int (the iNPUT ( 'Please enter the month:'))
the while yue not in the Range (1, 13):
yue = int (the iNPUT ( 'fool, you have a family calendar' + str (yue) + 'May it please re-enter:?'))
the y-= {1: 1, 2: 4,3: 4, 4: 0,5: 2, 6 : 5,7: 0,8: 3,9: 6,10: 1,11: 4,12:}. 6
Y1 = Y [Yue]
RI = int (iNPUT ( 'enter one day:'))
the while Not RI the Range in (1,32):
RI = int (the iNPUT ( 'fool,' + str (yue) + ' May have' + str (ri) + ' ? -day re-enter it:'))
for k in A:
Nian + 2000 K == IF and (Yue Yue == ==. 1 or 2):
J = J. 1-
DATE J = RI + + + Y1. 6
the while DATE>. 7:
date=date-7
= 1-DATE DATE
IF DATE == 0:
Print (str (nian + 2000) + 'of' + str (yue) + 'month' + str (ri) + 'Day is Sunday')
elif DATE == 1:
print (str (nian + 2000) + ' of' + str (yue) + 'month' + str (ri) + 'day is Monday')
elif dATE == 2:
print (str (nian + 2000) + ' in '+ str (yue) +' month '+ str (ri) +' day is Tuesday ')
elif dATE == 3:
Print (str (nian + 2000) +' of '+ str (yue) +' months' + str (ri) + 'day is Wednesday')
elif dATE == 4:
Print (str (nian + 2000) + 'of' + str (yue) + 'month' + str (ri) + 'day is Thursday' )
elif dATE == 5:
Print (str (nian + 2000) + 'of' + str (yue) + 'month' + str (ri) + 'day is Friday')
elif dATE == 6:
Print (str ( nian + 2000) + 'of' + str (yue) + 'month' + str (ri) + 'day is Saturday')
Import Time
IF nian and 2019 + 2000 == == yue RI == 1 and 30:
Print ( '! Blackie US today is a good first met oh')
the time.sleep (2)
print ( 'to see the first movie is [Neptune]!')
the time.sleep (2)
print ( 'I did not expect this is the beginning of the story')
elif 1800 <= nian <1900:
nian nian-1800 =
for I1 in Range (1,8):
for I2 in F [I1]:
IF I2 == Nian:
J = I1
BREAK
for K in A:
IF + K == Nian 1800:
Print (STR (Nian + 1800) + 'years leap Year ')
yue = int (the iNPUT (' Please enter the month: '))
the while yue not in the Range (1, 13):
yue = int (the iNPUT (' fool, you have a family calendar '+ str (yue) +' ? Please enter it month: '))
Y = {. 1: 1,2: 4,3-: 4,4 &: 0,5: 2,6: 5,7: 0,8: 3,9: 6,10 : 1,11: 4,12:}. 6
Y1 = Y [Yue]
RI = int (iNPUT ( 'enter one day:'))
the while RI Not in Range (1,32):
RI = int (iNPUT ( 'fool , '+ str (yue) + ' May have '+ str (ri) +' day please re-enter:? '))
for k in A:
if k == nian + 1800 and ( yue == 1 or yue == 2):
. 1 = J-J
DATE = Y1 + RI + J + 2
the while DATE>. 7:
DATE =. 7-DATE
DATE DATE =. 1-
IF DATE == 0:
Print (STR (Nian + 1800) + 'of' + str ( yue) + 'month' + str (ri) + 'day is Sunday')
elif dATE == 1:
Print (str (nian + 1800) + 'of' + str (yue) + 'month' + str (ri) + 'day is Monday')
elif dATE == 2:
Print (str (nian + 1800) + 'of' + str (yue) + 'month' + str (ri) + 'day is Tuesday')
elif dATE = 3 =:
Print (str (nian + 1800) + 'of' + str (yue) + 'month' + str (ri) + 'day is Wednesday')
elif dATE == 4:
Print (str (nian + 1800) + 'of' + str (yue) + 'month' + str (ri) + 'day is Thursday')
elif dATE == 5:
Print (str (nian + 1800) + 'of' + str (yue) + ' May '+ str (ri) +' day is Friday ')
elif dATE == 6:
print (str (nian + 1800) + ' of' + str (yue) + 'month' + str (ri) + 'Day is Saturday')
Import Time
nian 2019 + 2000 == IF and yue RI == == 1 and 30:
Print ( '! Blackie US today is a good first met oh')
the time.sleep (2)
Print ( 'first movie watching Neptune is []! ')
the time.sleep (2)
Print (' did not think this is the beginning of the story ')


Guess you like

Origin www.cnblogs.com/laoliu07/p/11620478.html