diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/.keep" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/.keep" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/.keep" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/2\347\217\255_\346\231\223\345\256\201__\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\23201.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/2\347\217\255_\346\231\223\345\256\201__\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\23201.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/2\347\217\255_\346\231\223\345\256\201__\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\23201.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/2\347\217\255_\346\231\223\345\256\201__\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\23201.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/2\347\217\255_\346\231\223\345\256\201__\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\23202.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/2\347\217\255_\346\231\223\345\256\201__\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\23202.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/2\347\217\255_\346\231\223\345\256\201__\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\23202.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/2\347\217\255_\346\231\223\345\256\201__\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\23202.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2543\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2543\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2543\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\2541\345\221\250\347\254\2543\350\212\202\350\257\276\345\220\216\344\275\234\344\270\232.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2543\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\2541\345\221\250\347\254\2543\350\212\202\350\257\276\345\220\216\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..f5ac2956b39b31cf716d5aa8e971c35d861af825 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2541\345\221\250-\347\254\2543\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\2541\345\221\250\347\254\2543\350\212\202\350\257\276\345\220\216\344\275\234\344\270\232.md" @@ -0,0 +1,48 @@ +# 第1周第3节课后作业: + +## 1.四大基本数据结构中,哪些是可变得,哪些是不可变的? + +可变的:`list`,`dict`,`set` + +不可变的:`tuple` + +## 2.四大基本数据结构中,哪些是有序的,哪些是无序的? + +有序的:`list`,`tuple` + +无序的:`dict`,`set` + +## 3.创建四大结构实例,每个数据结构需要包括六大数据类型.(有一个数据结构是没办法包含六大) + +1.list实例 + +``` +list1 =(1,1.5,"hello world",bool(2),bytes("hello world".encode("utf-8")),None) + +print(list1) +``` + +2.tuple实例 + +``` +tup1 =(1,1.5,"hello world",bool(2),bytes("hello world".encode("utf-8")),None) + +print(tup1) +``` + +3.dict实例 + +``` +d = {"a": 1, "b": 1.5, "c": "hello world","d": bool(2),"e":bytes("hello world".encode("utf-8")),"f": None} + +print (d) +``` + +4.set实例 + +``` +set1 = {1,1.5,"hello world",bool(2),bytes("hello world".encode("utf-8")),None} + +print (set1) +``` + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2542\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2542\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2542\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/my_calculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2542\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..268ea698950a3b517b27ebd022374f8f1c3c567b --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_\346\231\223\345\256\201/\347\254\2542\345\221\250-\347\254\2541\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/my_calculator.py" @@ -0,0 +1,59 @@ + +# 第2周第1节课后作业 +# 1.加法 +def add(x,y): + result = x + y + return result + +result = add(x = 2,y = 3) +print(result) + +# 2.减法 +def min(x,y): + result = x - y + return result + +result = min(x = 2,y = 3) +print(result) + +# 3.乘法 +def mul(x,y): + result = x * y + return result + +result = mul(x = 2,y = 3) +print(result) + +# 4.除法 +def into(x,y): + result = x / y + return result + +result = into(x = 2,y = 3) +print(result) + +# 5.整除 +def divide(x,y): + result = x // y + return result + +result = divide(x = 2,y = 3) +print(result) + +# 6.取余 +def yu(x,y): + result = x % y + return result + +result = yu(x = 2,y = 3) +print(result) + + +# 7.开方 +def sqrt(x,y): + result = x **(1/y) + + return result + +result = sqrt(x = 2,y = 3) +print(result) \ No newline at end of file