摘要:
import pymysqlimport wxclass MyFrame(wx.Frame): def __init__(self,parent,id): wx.Frame.__init__(self,parent,id,title="学生信息收集",size=(400,300)) #创建面板 pa 阅读全文
摘要:
name = ['小明', '老李']age = ['10岁', '90岁']sex = ['男']activity = ["上山去砍柴", "开车去东北", "最爱打游戏"] def func(a,b,c): print("{},{},{},{}".format(name[a],age[b],se 阅读全文
摘要:
import jieba# -*- coding: utf-8 -*- txt = open("D:\\python\\jieba\\聊斋志异.txt", "r", encoding='gb18030').read() words = jieba.lcut(txt) counts = {} for 阅读全文
摘要:
from random import randomdef printIntro(): #打印程序介绍信息 print("20信计2班 甘发亮 50号 乒乓球比赛规则编程如下") print("这个程序模拟两个选手A和B的某种竞技比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表 阅读全文
摘要:
import turtle as timport timedef popspace(): t.penup() t.fd(5)def popline(draw): popspace() t.pendown() if draw else t.penup() t.fd(40) popspace() t.r 阅读全文
摘要:
import mathimport timescale=10print("执行开始")t=time.process_time()for i in range(scale+1): a,b='**'*i,'..'*(scale-i) c=(i/scale)*100 π=4*(4*math.atan(1/ 阅读全文
摘要:
03运行超市抹零结账行为 money_all = 56.75+ 72.91+ 88.50+ 26.37+ 68.51# 累加总计金额money_all_str = str(money_all)#转换为字符串print("商品总金额为:"+money_all_str)money_real = int( 阅读全文
摘要:
w=eval(input("请输入矩形的长:\n")) h=eval(input("请输入矩形的宽:\n")) area=round(w*h,2) print("矩形的面积是:"+str(area)) 阅读全文