亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

python3實現(xiàn)表白神器

 更新時間:2019年04月09日 08:37:53   作者:不入行不改昵稱  
這篇文章主要為大家詳細介紹了python3實現(xiàn)表白神器,具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例為大家分享了使用python3制作的表白神器,供大家參考,具體內(nèi)容如下

使用python3制作的小玩意,哪里需要改造的,望各位評論一下!

#coding=utf-8
#第一個小項目/love 0.0.4
#該程序目的是為了表白而誕生的
#程序原創(chuàng)者:文
import time
import turtle
i = 0 
q = 2 
name = ['某某','某某某','1'] #填寫她名字
lovename = ['文', '1'] #這里填寫你的名字

def yanchi():
 time.sleep(3) #此出應(yīng)選3,如需調(diào)試,請將此出寫0

def love():
 print('')
 print('    //       //////     //    //    //////////    ')
 print('   //      //   //    //    //    //        ')
 print('   //      ///    ///    //   //    //        ')
 print('  //      ///    ///    //   //    //////////    ')
 print('  //       ///    ///    //  //     //        ')
 print(' //        //   //      // //     //        ')
 print(' /////////     //////       ///      //////////    ')

def tuxing():
 def hart_arc():
 for i in range(200):
  turtle.right(1)
  turtle.forward(2)
  
 def move_pen_position(x, y):
 turtle.hideturtle()   # 隱藏畫筆(先)
 turtle.up()   # 提筆
 turtle.goto(x, y)  # 移動畫筆到指定起始坐標(窗口中心為0,0)
 turtle.down()  # 下筆
 turtle.showturtle()   # 顯示畫筆
 love = ''
 signature = 'Mr.文' #這里填寫你的名字
 if love == '':
 love = 'I Love You'
 # 初始化
 turtle.setup(width=800, height=500)   # 窗口(畫布)大小
 turtle.color('red', 'pink')   # 畫筆顏色
 turtle.pensize(3)    # 畫筆粗細
 turtle.speed(1)   # 描繪速度
 # 初始化畫筆起始坐標
 move_pen_position(x=0,y=-180)  # 移動畫筆位置
 turtle.left(140)  # 向左旋轉(zhuǎn)140度
 turtle.begin_fill()   # 標記背景填充位置
 # 畫心形直線( 左下方 )
 turtle.forward(224)  # 向前移動畫筆,長度為224
 # 畫愛心圓弧
 hart_arc()   # 左側(cè)圓弧
 turtle.left(120)  # 調(diào)整畫筆角度
 hart_arc()   # 右側(cè)圓弧
 # 畫心形直線( 右下方 )
 turtle.forward(224)
 turtle.end_fill()    # 標記背景填充結(jié)束位置
 # 在心形中寫上表白話語
 move_pen_position(0,0)   # 表白語位置
 turtle.hideturtle()   # 隱藏畫筆
 turtle.color('#CD5C5C', 'pink')   # 字體顏色
 # font:設(shè)定字體、尺寸(電腦下存在的字體都可設(shè)置) align:中心對齊
 turtle.write(love, font=('Arial', 30, 'bold'), align="center")
 # 簽寫署名
 if signature != '':
 turtle.color('red', 'pink')
 time.sleep(2)
 move_pen_position(180, -180)
 turtle.hideturtle() # 隱藏畫筆
 turtle.write(signature, font=('Arial', 20), align="center")
 # 點擊窗口關(guān)閉程序
 window = turtle.Screen()
 window.exitonclick()
 
print('程序載入中....')
yanchi()
love()
yanchi()
print('')

print('='*70)
print('='*70)
yanchi()
print('(提示:您有三次輸入的機會!三次過后直接退出。)')

while i<3:
  i+=1
  print('='*70)
  insertName = input('請準確的輸入你的名字:  ')
  print('='*70)

  if insertName in name: 
    print('Hello,%s,Welcome。'%insertName)
    print('='*70)
    break
  else:
    print('(提示:您有三次輸入的機會!)')
    print('第%d輸入錯誤!剩余%d次!'%(i,q))
    q-=1
    if q==-1:
      print('你是不是故意的。。。!')
      yanchi()
      input('程序已結(jié)束,請按回車鍵退出!?。?)
      exit()
  
print (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())) #顯示本地時間
print('來玩玩游戲吧,選一個')
print('1、猜猜誰最在乎你')
print('2、即將推出')
print('3、即將推出')
xuanxiang = input('選一個吧:')
while xuanxiang == ''or'2'or'3':
 if xuanxiang == '':
 xuanxiang1 = '不能為空白哦'
 if xuanxiang == '2'or '3':
 xuanxiang1 = '此選項即將推出'
 if xuanxiang == '1':
 break
 xuanxiang = input('%s,請重新選一個吧:'%xuanxiang1)
if xuanxiang == '1':
 
 while True:
 love = input('請輸入你認為誰最在乎你的那個人的名字吧:')
 print('='*70)

 if love in lovename:  
  print('='*70)
  yanchi()
  print('*'*70)
  print('如果你看到下面這句話的話,就告訴他吧,他等你很久了。')
  print('*'*70)
  tuxing()
  print('不要讓后來的我們什么都有了,卻沒有了我們。。。。')
  print('*'*70)
  print('*'*70)
  break
 else:
  print('輸入錯了,再好好考慮考慮,要不然不給你出去,哼,重新輸入?。?!')
  print('='*70)


time.sleep(5)
input('程序執(zhí)行完畢,按回車鍵退出!')

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論