猫史档案馆


LAG的1048576一枚

LAG的1048576一枚

Lv.1

已注销的小号

获赞:20收藏:11浏览:404作品收藏:15
回复帖子评论
上一页3 页 / 共 6下一页

Java学习教程(第五章)[变量]{1.字面量} 中回复

d'd'd'd'd'd'd'd'd'd'd'd'd'd'd

2020-04-25T16:44:36 点赞:0

投票2LAG 中回复

print(喵11111)

2020-04-30T15:41:08 点赞:0

【V1.3.3-更新】海龟编辑器-新版发布! 中回复

测试

2020-04-30T16:35:03 点赞:0

【V1.3.3-更新】海龟编辑器-新版发布! 中回复

喵Python

2020-04-30T16:36:48 点赞:0

【bcm刷屏专用区】 中回复

刷屏

2020-04-30T16:38:25 点赞:0

【刷屏区】BCM刷屏区(请加精!!)(用途:引流,减少其他地方刷屏) 中回复

刷屏1:iframe

2020-04-30T16:40:57 点赞:0

【刷屏区】BCM刷屏区(请加精!!)(用途:引流,减少其他地方刷屏) 中回复

刷屏:超大子

刷屏

2020-04-30T16:43:24 点赞:0

无聊自己搞个诗词分析网站............. 中回复

503了

2020-05-01T10:22:07 点赞:0

【2017硅谷行】曹子衿。别看,里面很精彩2! 中回复

挖坟

2020-05-01T10:26:32 点赞:0

公告!!! 中回复

AAAAAAA

2020-05-01T11:25:42 点赞:0

公告!!! 中回复

绝对选A!!!!!

2020-05-01T11:28:43 点赞:0

【刷屏区】BCM刷屏区(请加精!!)(用途:引流,减少其他地方刷屏) 中回复

顾惠而故意不也认购一半额不应该UR干部也不远吧股依然不顾一般讣U币个而五个人该扔柔荑花无人合同

2020-05-01T11:35:42 点赞:0

【刷屏区】BCM刷屏区(请加精!!)(用途:引流,减少其他地方刷屏) 中回复

 

1255727575257274242525257257275275275

2020-05-01T11:40:57 点赞:0

把你心中认定的喵发出来! 中回复

JavaScript&typescript

2020-05-01T13:07:18 点赞:0

【自定义源码编辑器客户端】一招自定义网站 中回复

JSON……

2020-05-01T13:09:29 点赞:0

【有奖】编程猫“2016母亲节活动”获奖名单公布!本周六有新活动~ 中回复

挖坟

2020-05-01T13:16:53 点赞:0

我来了…… 中回复

当我攒够50赞,我也自已做

2020-05-01T15:40:02 点赞:0

我来了…… 中回复

Python

2020-05-01T15:41:31 点赞:0

我来了…… 中回复

我是104876工作室!

但大号是Nemo的  !

2020-05-01T15:44:43 点赞:0

【光明工作室再次招人】 中回复

dalao

2020-05-01T15:47:26 点赞:0

我来了…… 中回复

我要……帮你招人!!!!!!

2020-05-01T15:49:07 点赞:0

有有有有有人吗?? 中回复

EEEEEEEEE

2020-05-01T16:22:01 点赞:0

编程猫社区APP有特性! 中回复

2020-05-01T16:27:18 点赞:0

【留下你名字的缩写,让别人猜你叫什么】 中回复

wf

2020-05-01T16:32:50 点赞:0

【睡觉去消息】 中回复

好的,但我用的是PyCharm不用海归

2020-05-01T16:37:50 点赞:0

汉字工作室头像 中回复

鹅鹅鹅 冒泡泡…………

2020-05-02T08:55:58 点赞:0

【Python作品分享】整数加法计算器【作品秀】 中回复

from tkinter import *
import easygui
import math
import cmath
w = Tk()
equation,final = StringVar(),StringVar()
def num(n):
    equation.set(equation.get() + str(n))
sin,cos,tan = lambda n: math.sin(math.radians(n)),lambda n: math.cos(math.radians(n)),lambda n: math.tan(math.radians(n))
sinh,cosh,tanh = math.sin,math.cos,math.tan
asin,acos,atan = math.asin,math.acos,math.atan
csjn,ccos,ctan = cmath.asin,cmath.acos,cmath.atan
csjnh,ccosh,ctanh = cmath.sinh,cmath.cosh,cmath.tanh
casjn,cacos,catan = cmath.asin,cmath.acos,cmath.atan
deg,rad,sqrt = math.degrees,math.radians,math.sqrt
binary,october,hexadecimal = lambda n: bin(n)[2:],lambda n: oct(n)[2:],lambda n: hex(n)[2:]
ln,log,log2 = math.log,math.log10,math.log2
π,e,fact = math.pi,math.e,math.factorial
decimal_fraction = lambda n: n - int(n)
def ce():
    equation.set('')
    final.set('')
def ccalculate():
    try:
        result: complex = eval(equation.get().replace('×', '*').replace('÷', '/').replace('^', '**').replace('mod', '%').replace('i', 'j').replace('sjn', 'csjn').replace('cos', 'ccos').replace('tab', 'ctan').replace('asjn', 'casjn').replace('acos', 'cacos'))
        result: complex = complex(round(result.real,2),round(result.imag,2))
    except Exception:
        easygui.exceptionbox()
        ce()
def calculate():
    try:
        final.set(f"={str(eval(equation.get().replace('×','*').replace('÷','/').replace('^','**').replace('mod','%')))}")
    except Exception:
        easygui.exceptionbox()
        ce()
def function(name):
    equation.set(name + '(' + equation.get() + ')')
w.geometry('1500x1000')
Button(w, text=0, command=lambda: num(0), width=7, height=2, font=('Arial',20)).grid(row=1,column=0)
Button(w, text=1, command=lambda: num(1), width=7, height=2, font=('Arial',20)).grid(row=1,column=1)
Button(w, text=2, command=lambda: num(2), width=7, height=2, font=('Arial',20)).grid(row=1,column=2)
Button(w, text=3, command=lambda: num(3), width=7, height=2, font=('Arial',20)).grid(row=2,column=0)
Button(w, text=4, command=lambda: num(4), width=7, height=2, font=('Arial',20)).grid(row=2,column=1)
Button(w, text=5, command=lambda: num(5), width=7, height=2, font=('Arial',20)).grid(row=2,column=2)
Button(w, text=6, command=lambda: num(6), width=7, height=2, font=('Arial',20)).grid(row=3,column=0)
Button(w, text=7, command=lambda: num(7), width=7, height=2, font=('Arial',20)).grid(row=3,column=1)
Button(w, text=8, command=lambda: num(8), width=7, height=2, font=('Arial',20)).grid(row=3,column=2)
Button(w, text=9, command=lambda: num(9), width=7, height=2, font=('Arial',20)).grid(row=4,column=1)
Button(w, text='i', command=lambda: num('i'), width=7, height=2, font=('Arial',20)).grid(row=3,column=6)

Button(w, text='.', command=lambda: num('.'), width=7, height=2, font=('Arial',20)).grid(row=5,column=3)
Button(w, text='+', command=lambda: num('+'), width=7, height=2, font=('Arial',20)).grid(row=1, column=3)
Button(w, text='-', command=lambda: num('-'), width=7, height=2, font=('Arial',20)).grid(row=2, column=3)
Button(w, text='×', command=lambda: num('×'), width=7, height=2, font=('Arial',20)).grid(row=3, column=3)
Button(w, text='÷', command=lambda: num('÷'), width=7, height=2, font=('Arial',20)).grid(row=4, column=3)
Button(w, text='^', command=lambda: num('^'), width=7, height=2, font=('Arial',20)).grid(row=4, column=2)
Button(w, text='(', command=lambda: num('('), width=7, height=2, font=('Arial',20)).grid(row=5, column=1)
Button(w, text=')', command=lambda: num(')'), width=7, height=2, font=('Arial',20)).grid(row=5, column=2)
Button(w, text='阶乘', command=lambda: function('fact'), width=7, height=2, font=('Arial',20)).grid(row=5, column=0)
Button(w, text='sin(角度)', command=lambda: function('sin'), width=7, height=2, font=('Arial',20)).grid(row=6, column=0)
Button(w, text='cos(角度)', command=lambda: function('cos'), width=7, height=2, font=('Arial',20)).grid(row=6, column=1)
Button(w, text='tan(角度)', command=lambda: function('tan'), width=7, height=2, font=('Arial',20)).grid(row=6, column=2)
Button(w, text='sin(弧度)', command=lambda: function('sinh'), width=7, height=2, font=('Arial',20)).grid(row=7, column=0)
Button(w, text='cos(弧度)', command=lambda: function('cosh'), width=7, height=2, font=('Arial',20)).grid(row=7, column=1)
Button(w, text='tan(弧度)', command=lambda: function('tanh'), width=7, height=2, font=('Arial',20)).grid(row=7, column=2)
Button(w, text='asin', command=lambda: function('asin'), width=7, height=2, font=('Arial',20)).grid(row=8, column=0)
Button(w, text='acos', command=lambda: function('acos'), width=7, height=2, font=('Arial',20)).grid(row=8, column=1)
Button(w, text='atan', command=lambda: function('atan'), width=7, height=2, font=('Arial',20)).grid(row=8, column=2)
Button(w, text='平方根', command=lambda: function('sqrt'), width=7, height=2, font=('Arial',20)).grid(row=10, column=0)
Button(w, text='弧度-角度', command=lambda: function('deg'), width=7, height=2, font=('Arial',20)).grid(row=9, column=0)
Button(w, text='角度-弧度', command=lambda: function('rad'), width=7, height=2, font=('Arial',20)).grid(row=9, column=1)
Button(w, text='绝对值', command=lambda: function('abs'), width=7, height=2, font=('Arial',20)).grid(row=9, column=2)
Button(w, text='二进制', command=lambda: function('binary'), width=7, height=2, font=('Arial',20)).grid(row=10, column=1)
Button(w, text='八进制', command=lambda: function('october'), width=7, height=2, font=('Arial',20)).grid(row=10, column=2)
Button(w, text='十六进制', command=lambda: function('hexadecimal'), width=7, height=2, font=('Arial',20)).grid(row=10, column=3)
Button(w, text='log2', command=lambda: function('log2'), width=7, height=2, font=('Arial',20)).grid(row=1, column=4)
Button(w, text='log10', command=lambda: function('log'), width=7, height=2, font=('Arial',20)).grid(row=1, column=5)
Button(w, text='ln', command=lambda: function('ln'), width=7, height=2, font=('Arial',20)).grid(row=1, column=6)
Button(w, text='π', command=lambda: num('π'), width=7, height=2, font=('Arial',20)).grid(row=2, column=6)
Button(w, text='e', command=lambda: num('e'), width=7, height=2, font=('Arial',20)).grid(row=2, column=4)
Button(w, text='CE', command=ce, width=7, height=2, font=('Arial',20)).grid(row=3, column=5)
Button(w, text='取余', command=lambda: num(' mod '), width=7, height=2, font=('Arial',20)).grid(row=1, column=7)
Button(w, text='取整', command=lambda: function('int'), width=7, height=2, font=('Arial',20)).grid(row=2, column=7)
Button(w, text='取小', command=lambda: function('decimal_fraction'), width=7, height=2, font=('Arial',20)).grid(row=2, column=5)
Button(w, text='←', command=lambda: equation.set(equation.get()[:-1]), width=7, height=2, font=('Arial',20)).grid(row=2, column=6)
Button(w, text='=', command=calculate, width=7, height=2, font=('Arial',20)).grid(row=4,column=0)
Button(w, text='复数运算', command=ccalculate, width=7, height=2, font=('Arial',20)).grid(row=3,column=4)

Label(w, textvar=final, font=('Arial',30)).grid(row=0,column=6)
Label(w, textvar=equation, font=('Arial',30)).grid(row=0,column=2)
w.title('计算器')
w.mainloop()
# 1.959601041421606*%i+3.165778513216168

2020-05-02T08:59:03 点赞:0

免费送代码岛3.0地图 中回复

我!!!

2020-05-02T10:28:08 点赞:0

【Python聊天室教程】基本介绍与准备工作 中回复

niubi

2020-05-02T10:30:24 点赞:0

【vbs】vbs教程(八)使用密码加密计算器 中回复

dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd的点点滴滴

2020-05-02T10:32:05 点赞:0