magicians = ['ergou','qiqi','shitou']
great_magicians = []
def make_great(magicians,great_magicians):
while magicians:
magician = magicians.pop()
great_magician = 'the Great' + magician
great_magicians.append(great_magician)
def show_magicianslis(great_magicians):
for name in great_magicians:
print(name)
......................
阅读全部
|
GunL
贴于 2021年7月6日 21:32
hide
bbsi
def milk_album(name,album_name,number=''):
album = {'name':name,'album_name':album_name}
return album
while True:
print("(enter 'q' at any time to quit)")
name = input("请输入歌手名:")
if name == 'q':
break
album_name = input("请输入专辑名:")
if album_name == 'q':
break
print(milk_album(name,album_name))
阅读全部
|
GunL
贴于 2021年7月6日 21:29
hide
bbsi
places = {}
polling_active = True
while polling_active:
name = input("\n What is your name? ")
response = input("If you could visit one place in the world, where would you go?")
places[name] = response
repeat = input("Would you like to let another person respond? (yes/ no) ")
if repeat == 'no':
polling_active = False
print("\n--- Poll Results ---")
......................
阅读全部
|
GunL
贴于 2021年7月6日 21:20
hide
bbsi
https://bbs.bccn.net/member.php?action=activate_bccn_uid=999054_bccn_id=mpZlUs
阅读全部
|
xincheng1984
贴于 2021年4月14日 13:58
hide
bbsi
# -*- coding:utf-8 -*-
import socket
from time import ctime, sleep
import threading
class ChatRoomPlus:
def __init__(self):
# 全局参数配置
self.encoding = "utf-8" # 使用的编码方式
self.broadcastPort = 7788 # 广播端口
......................
阅读全部
|
静夜思
贴于 2021年4月6日 20:29
hide
bbsi
import pickle
import os
datafile = 'person.data'
line = '======================================='
message = '''
=======================================
Welcome bookmark:
press 1 to show list
press 2 to add pepole
press 3 to edit pepole
press 4 to delete pepole
......................
阅读全部
|
metersbilly
贴于 2021年3月24日 09:54
hide
bbsi
import math
#dot=[[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]]
dot=[[2,1],[4,8],[1,2],[3,6]]
def fang_cheng(dot):
fc=[]
l=len(dot)
for i in range(l) :
for j in range(i+1,l):
a=dot[j][0]-dot[i][0]
b=dot[i][1]-dot[j][1]
......................
阅读全部
|
qunxingw
贴于 2021年3月23日 11:54
hide
bbsi
def float_(n):
if n==0:
return 0
len=0
s=n
while(n>=1):
n=n/10
len=len+1
t=n
return s/(10**len-1)
......................
阅读全部
|
qunxingw
贴于 2021年3月15日 00:13
hide
bbsi