首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看Python 3
#!/usr/bin/env python
# -*- coding:utf-8 -*-

import turtle
import time

#  画心形圆弧
def hart_arc():
      for i in range(200):
            turtle.right(1)
            turtle.forward(2)

......................
阅读全部 | 苍凌 贴于 2020年5月2日 19:12     hide bbsi
print('hello')
阅读全部 | dairyboy 贴于 2019年9月19日 21:36     hide bbsi
python中有没有方法实现下面的代码?
就是用变量代替函数名,使用变量名也能实现函数的功能。


def test1():
    print("----1----")

local_name = test1

local_name()
阅读全部 | eakit67 贴于 2019年1月7日 22:04     hide bbsi
客户端
#!/usr/bin/env python3
#coding=utf-8

from socket import *
import sys 
import getpass

def main():
    if len(sys.argv) < 3:
        print("argv is error")
        return
......................
阅读全部 | 网贷小黑人 贴于 2018年9月28日 21:00     hide bbsi
print("-----------Welcom to Guess Game----------")
i=0
while i<6:
    temp = input("猜猜我在想什么:")
    guess = int(temp)
    if guess == 6:
        print("You are so great!")
        i=6
    else:
        if guess > 6:
            print("Bigger")
        else:
......................
阅读全部 | 漠河狼烟 贴于 2017年6月3日 23:01     hide bbsi
from datetime import datetime
import math
from tkinter import*
class StillClock(Canvas):
def __init__(self):
super().__init__()

self.setcurrenttime()
self.pack()
self.mainloop()
def gethour(self):
return self.__hour
......................
阅读全部 | Jangle_ 贴于 2016年12月28日 15:16     hide bbsi
上一页 1 2