From bc8a6c71a9a0be946ec483ffedaf68b15549f61a Mon Sep 17 00:00:00 2001 From: ttyhtg Date: Tue, 22 Dec 2020 22:36:47 +0800 Subject: [PATCH] =?UTF-8?q?4=E7=8F=AD-=E6=AD=A6=E6=98=8E=20-=E7=AC=AC?= =?UTF-8?q?=E4=BA=8C=E5=91=A8-=E7=AC=AC1=E6=AC=A1=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...02\350\257\276\344\275\234\344\270\232.py" | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\255\246\346\230\216/4\347\217\255-\346\255\246\346\230\216-\347\254\254\344\272\214\345\221\250-\347\254\2541\350\212\202\350\257\276\344\275\234\344\270\232.py" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\255\246\346\230\216/4\347\217\255-\346\255\246\346\230\216-\347\254\254\344\272\214\345\221\250-\347\254\2541\350\212\202\350\257\276\344\275\234\344\270\232.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\255\246\346\230\216/4\347\217\255-\346\255\246\346\230\216-\347\254\254\344\272\214\345\221\250-\347\254\2541\350\212\202\350\257\276\344\275\234\344\270\232.py" new file mode 100644 index 00000000..ac82c8c5 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\255\246\346\230\216/4\347\217\255-\346\255\246\346\230\216-\347\254\254\344\272\214\345\221\250-\347\254\2541\350\212\202\350\257\276\344\275\234\344\270\232.py" @@ -0,0 +1,41 @@ +#my_calculator.py + +#求和 +def add(a,b): + return a + b + +#求差 +def minus(a,b): + return a - b + +#求积 +def multiply(a,b): + return a * b + +#求商 +def divide(a,b): + return a / b + +#整除 +def divisi(a,b): + return a // b + +#取余 +def rem(a,b): + return a % b + +#次幂 +def pow(a,b): + return a ** b +#求根 +def root(a,b): + return a **(1/b) + +print('256+4等于:',add(256,4)) +print('256-4等于:',minus(256,4)) +print('256*4等于:',multiply(256,4)) +print('256/4等于:',divide(256,4)) +print('256整除4等于:',divisi(256,4)) +print('256/4余数为:',rem(256,4)) +print('256的4次幂等于:',pow(256,4)) +print('256开4次方根为:',root(256,4)) \ No newline at end of file -- Gitee