diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/bao\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/1\347\217\255_Bao_\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/bao\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/1\347\217\255_Bao_\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/1\347\217\255_Bao_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2321.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/1\347\217\255_Bao_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2321.png" new file mode 100644 index 0000000000000000000000000000000000000000..16f2c12c613c5c1e96415cdb855e204b43e775b0 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/1\347\217\255_Bao_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2321.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/1\347\217\255_Bao_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/1\347\217\255_Bao_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322.png" new file mode 100644 index 0000000000000000000000000000000000000000..f3fccb0f555d16872bfde51c0b572df87b017faa Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_Bao/1\347\217\255_Bao_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/.keep" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/.keep" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/.keep" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\234\250pycharm\344\270\255\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\234\250pycharm\344\270\255\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..79150fca6a440febd39625f5cec4cd0f815997c4 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\234\250pycharm\344\270\255\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\357\274\214\345\271\266\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221\357\274\2101\357\274\211.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\357\274\214\345\271\266\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221\357\274\2101\357\274\211.png" new file mode 100644 index 0000000000000000000000000000000000000000..d01dcc70c20aa69fced62f8d98cdbb2b1cd9df2f Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\357\274\214\345\271\266\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221\357\274\2101\357\274\211.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\357\274\214\345\271\266\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221\357\274\2102\357\274\211.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\357\274\214\345\271\266\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221\357\274\2102\357\274\211.png" new file mode 100644 index 0000000000000000000000000000000000000000..c1a996df2e3a9c4c4149880ef0466bdac2b1ce93 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\344\270\200\345\217\252\350\277\267\350\267\257\347\232\204\347\206\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\357\274\214\345\271\266\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221\357\274\2102\357\274\211.png" differ 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/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\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/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\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/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/List\345\210\233\345\273\272\345\220\210\351\233\206.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/List\345\210\233\345\273\272\345\220\210\351\233\206.png" new file mode 100644 index 0000000000000000000000000000000000000000..c655c25e293bd72d02174f63bfc4774547989457 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/List\345\210\233\345\273\272\345\220\210\351\233\206.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/dict\345\210\233\345\273\272\345\220\210\351\233\206.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/dict\345\210\233\345\273\272\345\220\210\351\233\206.png" new file mode 100644 index 0000000000000000000000000000000000000000..3719259d3c572df887cde1578895a4016e0df4b7 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/dict\345\210\233\345\273\272\345\220\210\351\233\206.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/set\345\210\233\345\273\272\345\220\210\351\233\206.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/set\345\210\233\345\273\272\345\220\210\351\233\206.png" new file mode 100644 index 0000000000000000000000000000000000000000..58e5753a013fe6b9e6781a1f56797bdf6a280d12 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/set\345\210\233\345\273\272\345\220\210\351\233\206.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/tuple\345\210\233\345\273\272\345\220\210\351\233\206.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/tuple\345\210\233\345\273\272\345\220\210\351\233\206.png" new file mode 100644 index 0000000000000000000000000000000000000000..83cb699923657c51155143b0e449dafab0fcf78d Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/tuple\345\210\233\345\273\272\345\220\210\351\233\206.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256\345\222\214\347\254\254\344\272\214\351\227\256\347\255\224\346\241\210.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256\345\222\214\347\254\254\344\272\214\351\227\256\347\255\224\346\241\210.png" new file mode 100644 index 0000000000000000000000000000000000000000..d0dda6422658a0ee453aeb17102c526a786567bf Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256\345\222\214\347\254\254\344\272\214\351\227\256\347\255\224\346\241\210.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/images/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\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/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/images/.keep" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\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/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" new file mode 100644 index 0000000000000000000000000000000000000000..a1a93a471c2b32c7918214ae8658301a10206724 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" new file mode 100644 index 0000000000000000000000000000000000000000..4e8424f6831e89e23ccba9b35201262730e4fd58 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" new file mode 100644 index 0000000000000000000000000000000000000000..5674f765880a5548d4f46ca25c75cbca9b311ffa Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" new file mode 100644 index 0000000000000000000000000000000000000000..93f50cd48513ab57a13404c9ac7f66fac191337d Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\272\214\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" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/.keep" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\272\214\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" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\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/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..229d303037e837b1ffb4b8dfeb0306d15655086d --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\345\230\230\345\230\230/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/my_calculator.py" @@ -0,0 +1,60 @@ +print("请按以下数字选择你需要的运算:") +print("1、加法") +print("2、减法") +print("3、乘法") +print("4、除法") +print("5、整除") +print("6、取余") +print("7、开方") + + +def add(a, b): + return a + b + +def sub(a, b): + return a - b + +def mul(a, b): + return a * b + +def div(a, b): + return a / b + +def ediv(a, b): + return a // b + +def rem(a, b): + return a % b + +def sqrt(a): + return float(a ** (1/2)) + + +C = input("请输入你需要的运算方法(1-7):") +if C == '7': + a = int(input("请输入一个你想开方的数字:")) +else: + a = int(input("请输入第一个数字:")) + b = int(input("请输入第二个数字:")) + + + +if C == '1': + print(a, "+", b, "=", add(a, b)) + +elif C == '2': + print(a, "-", b, "=", sub(a, b)) + +elif C == '3': + print(a, "*", b, "=", mul(a, b)) + +elif C == '4': + print(a, "/", b, "=", div(a, b)) +elif C == '5': + print(a, "//", b, "=", ediv(a, b)) +elif C == '6': + print(a, "%", b, "=", rem(a, b)) +elif C == '7': + print(a, "^(1/2)", "=", sqrt(a)) +else: + print("请在指定范围内进行选择!") \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/1\347\217\255_\346\236\227\346\265\267\346\270\205-\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\232.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\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\232.md" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/1\347\217\255_\346\236\227\346\265\267\346\270\205-\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\232.md" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\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\232.md" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276\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/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..9315e4c168a404e1926dcb6ba95d692c9aae2bb1 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232.md" @@ -0,0 +1,32 @@ +Q: 四大基本数据结构中哪些是可变的,哪些是不可变的? + +A: + +可变的数据结构 + +``` +list dict set +``` + +不可变的数据结构 + +``` +tuple +``` + +Q:四大基本数据结构中哪些是有序的,哪些是无序的? + +A: + +有序的数据结构 + +``` +list tuple +``` + +无序的数据结构 + +``` +dict set +``` + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\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/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232.py" new file mode 100644 index 0000000000000000000000000000000000000000..e880cadf58ec7d6e8c333a78233999034df542e6 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232.py" @@ -0,0 +1,14 @@ +l = [1,1.0 ,'1',True,None,b'1'] +print(l) +[1, 1.0, '1', True, None, b'1'] +t =(1,1.0,'1',True,None,b'1') +print(t) +(1, 1.0, '1', True, None, b'1') +d ={"int":1,"float":1.0,"string":'1',"bool":True,"None":None,"bytes":b'1'} +print(d) +{'int': 1, 'float': 1.0, 'string': '1', 'bool': True, 'None': None, 'bytes': b'1'} +s = {1,1.0,'1',True,None,b'1'} +print(s) +{1, None, '1', b'1'} +s = {2,2.1,'3',False,None,b'5'} +print(s) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276\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/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..7dce7f0003ab0c97e000bdc2bec156bd77061202 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/1\347\217\255_\346\236\227\346\265\267\346\270\205-\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232.md" @@ -0,0 +1,5 @@ +![git](./image/git.png) + +![虚拟环境](./image/虚拟环境.png) + +![仓库](./image/仓库.png) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/git.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/git.png" new file mode 100644 index 0000000000000000000000000000000000000000..f0d21b3d4690343345fe8602057a8e82c772daa9 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/git.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/\344\273\223\345\272\223.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/\344\273\223\345\272\223.png" new file mode 100644 index 0000000000000000000000000000000000000000..e25357b4be2248760cb50f92c791d94349b45122 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/\344\273\223\345\272\223.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/\350\231\232\346\213\237\347\216\257\345\242\203.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..8342da573004b3fc2063a3b25f50412359996469 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\236\227\346\265\267\346\270\205/image/\350\231\232\346\213\237\347\216\257\345\242\203.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/1.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/1.jpg" deleted file mode 100644 index ab64baf0b3d916f1e1bf8d33c2641333738a730e..0000000000000000000000000000000000000000 Binary files "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/1.jpg" and /dev/null differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\345\210\233\345\273\272\350\277\234\347\250\213\344\273\223\345\272\2231.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\345\210\233\345\273\272\350\277\234\347\250\213\344\273\223\345\272\2231.png" new file mode 100644 index 0000000000000000000000000000000000000000..2a434ea96e9c5ea412fa720c339fb340abfe1dc9 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\345\210\233\345\273\272\350\277\234\347\250\213\344\273\223\345\272\2231.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\345\210\233\345\273\272\350\277\234\347\250\213\344\273\223\345\272\2232.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\345\210\233\345\273\272\350\277\234\347\250\213\344\273\223\345\272\2232.png" new file mode 100644 index 0000000000000000000000000000000000000000..fcdec440e0ec601f6f9f2f8f33641fa28ffa437e Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\345\210\233\345\273\272\350\277\234\347\250\213\344\273\223\345\272\2232.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\350\231\232\346\213\237\347\216\257\345\242\203\345\210\233\345\273\272.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\350\231\232\346\213\237\347\216\257\345\242\203\345\210\233\345\273\272.png" new file mode 100644 index 0000000000000000000000000000000000000000..de1f898547c9b6c7170b66e21144a560770ef045 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\346\265\252\346\274\253\351\207\216\345\277\203\345\256\266/\350\231\232\346\213\237\347\216\257\345\242\203\345\210\233\345\273\272.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202/.keep" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/.keep" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202/.keep" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202/answer1&2" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202/answer1&2" new file mode 100644 index 0000000000000000000000000000000000000000..2494dfffce793cad474dc97310960d149705f055 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202/answer1&2" @@ -0,0 +1,5 @@ +Q1.四大基本数据结构中哪些是可变的, 哪些是不可变的? +A:可更改:list、dict、set,不可更改:tuple + +Q2.四大基本数据结构中哪些是有序的, 哪些是无序的? +A:有序:list、tuple,无序:dict、set \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202/answer3.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202/answer3.py" new file mode 100644 index 0000000000000000000000000000000000000000..6a49a613738ba24c45ab078954142b3fc1dbe083 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202/answer3.py" @@ -0,0 +1,38 @@ +a=int(1) #整数 +b=float(2.5) #浮点数 +c=str("The third subject of the first week") #字符串 +d=bool(1) #布尔值 +e=bytes('5'.encode('utf-8')) #二进制序列 +f=None #空 + +print(str("-------------------------------------")) + +list1=[a,b,c,d,e,f] #list列表 +print(list1) +print(type(list1)) +print(len(list1)) + +print(str("-------------------------------------")) + +tuple2=(a,b,c,d,e,f) #tuple元祖 +print(tuple2) +print(type(tuple2)) +print(len(tuple2)) + +print(str("-------------------------------------")) + +dict3={"qw":a,"er":b,"ty":c,"yu":d,"as":e,"df":f} #dict字典 +print(dict3) +print(type(dict3)) +print(len(dict3)) + +print(str("-------------------------------------")) + +set3={a,b,c,d,e,f} #set集合 +print(set3) +print(type(set3)) +print(len(set3)) + +print(str("-------------------------------------")) + +#set中不包含布尔值 \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232.12.15/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202/.keep" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232.12.15/.keep" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202/.keep" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202/\346\226\260\345\273\272\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245\347\240\201\344\272\221.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202/\346\226\260\345\273\272\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245\347\240\201\344\272\221.png" new file mode 100644 index 0000000000000000000000000000000000000000..1c9d14cc9988d3ff4e8360a2d6e94763f7286691 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202/\346\226\260\345\273\272\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245\347\240\201\344\272\221.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203\347\232\204\345\273\272\347\253\213.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203\347\232\204\345\273\272\347\253\213.png" new file mode 100644 index 0000000000000000000000000000000000000000..a9c5ef42a8b0f2cf3a0a0068142eadd3ee2e8f67 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\347\216\213\345\251\211\346\200\241/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203\347\232\204\345\273\272\347\253\213.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\360\237\207\274 \360\237\207\276 \360\237\207\274 \360\237\207\255/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.mad.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\360\237\207\274 \360\237\207\276 \360\237\207\274 \360\237\207\255/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.mad.md" new file mode 100644 index 0000000000000000000000000000000000000000..488eee4dd63f7bffa3f5b1b105b34c9116d5ac34 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/1\347\217\255/1\347\217\255_\360\237\207\274 \360\237\207\276 \360\237\207\274 \360\237\207\255/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.mad.md" @@ -0,0 +1,189 @@ +## 第一周-第三节课-随堂笔记 + +### 变量和赋值 + +- 什么是变量 + + - 一个实体的指代 + + - 查看变量的内存地址 + + ``` + id(x) + ``` + + - 可重新赋值 + +- 为变量赋值 + + - 通过=来赋值 + + ``` + x=3 + ``` + +- python的变量 + + - 被重新赋值之后的值去哪 + + - 被系统回收了 + + - python没有常量这个数据类型 + + - 程序员之间的约定,如果这个变量的命名都是大字母,那么就视为一个常量 + + + +### python的六大基本类型 + +``` +强调基本的原因,数据类型和数据结构指向的范围更加广泛,不要产生错误的认识,形成思想的定式 +``` + +- 通过type()函数来查看当前变量的数据结构 + +- int(整数) + +- float(浮点数) + + - 因为计算机内部只是1和0,所以浮点数强调的是小数的表现形式 + + - ``` + float('1,o') + float('INF') + ``` + +- string(字符串,字符序列) + - 在有些语言中,单个字符也是一个基本的数据类型(char) + + - 有序的 + + - 如何表示字符串 + - '' + - "" + - '''''''' + + - 转义字符 + + 告诉python解释器,我们当前要表示的是一个字符或特殊字符 + + - 通过 \ 来转义 + + ``` + "2\" + "2\n" + ``` + +​ boolean(布尔值) + +``` +bool(2) +bool(0) +``` + +用来表示True或者false + +- bytes(二进制序列) + + 二进制的表示形式 + +- None(空) + + 有了false和0,为什么还要有None,因为false有时候也是代表一种结果 + + + +### python的四大基本数据结构 + +- list(列表) + + - 用来装载不同数据类型的数据集结构 + - 列表的特点 + - 有序的 + - 可以装载任意数据类型 + - 可以更改的 + - 如何表示list + - 通过list()新建一个列表 + - 通过[]声明一个列表 + +- tuple(元组) + + - 就是不可修改的列表,常用来表示记录 + + - 特点 + + 不可更改, + + 有序的 + + 可以装载任意数据类型 + + 不可更改 + + - 通过(,)来声明一个元组 + + ``` + a=(1,2,3) + #声明单个元素的元组,要添加逗号 + a=(1,) + ``` + + - 通过tuple()新建一个元组 + + ``` + tuple("hello") + ``` + +- dict(字典) + + - 字典也叫hashtable.通过hash(散列)函数将传入的key值生成地址来查找value + + key->hash->函数->返回value的地址->通过地址返回value值 + + - 特点 + + 无序的 + + python3.6是有序的,无视这一点 + + - 字典的key必须是可hash的,也就是不可更改的,唯一的 + + - 字典本身是可更该的 + + - 如何表示字典 + + - 通过dict()来创建字典 + + ``` + dict(a=2) + ``` + + - 通过{}来声明一个字典 + + ``` + a={"a":2} + ``` + +- set(集合) + + - 什么是set + + 没有value的字典 + + - 特点 + + 无序的 + + 集合中的key必须是可hash的 + + 可以更改的 + + 元素是唯一的 + + - 通过set()来创建集合 + + ``` + set([1,1,3]) + ``` + + - 通过{}来表示 \ No newline at end of file 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_Super_Coding/week1/Pycharm\351\205\215\347\275\256Git.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_Super_Coding/week1/Pycharm\351\205\215\347\275\256Git.png" new file mode 100644 index 0000000000000000000000000000000000000000..d49fc94ebb70416ca25a7a43a4f2cdc8ce5accfb Binary files /dev/null and "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_Super_Coding/week1/Pycharm\351\205\215\347\275\256Git.png" differ 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_Super_Coding/week1/week1.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_Super_Coding/week1/week1.py" index 9b3dca6b802d13b2c1166212b9d9094125171df8..85c22ac263895f0477f82bef821c35278c1acbd1 100644 --- "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_Super_Coding/week1/week1.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_Super_Coding/week1/week1.py" @@ -19,5 +19,9 @@ def foo(): foo() """ # TabError: inconsistent use of tabs and spaces in indentation +<<<<<<< HEAD +# 一般 Tab 进行缩进,不能空格和tab混着用 +======= # 一般 Tab 进行缩进,不能空格和tab混着用 print('第一周') +>>>>>>> f55ba62e6a5cb463dd787581363b8ed1f4e94710 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_Super_Coding/week1/\346\217\220\344\272\244\345\220\214\346\255\245.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_Super_Coding/week1/\346\217\220\344\272\244\345\220\214\346\255\245.png" new file mode 100644 index 0000000000000000000000000000000000000000..d66dafd14dae61b716f6b46af5c185ef13a5fa5f Binary files /dev/null and "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_Super_Coding/week1/\346\217\220\344\272\244\345\220\214\346\255\245.png" differ 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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202.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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202.md" index 9f6266821360bd5424d03c3e02c70f1dc245f76c..51f24e873139717daaa90edab121fd3c07fc61cb 100644 --- "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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202.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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202.md" @@ -1,4 +1,7 @@ +<<<<<<< HEAD +======= <<<<<<< master +>>>>>>> f55ba62e6a5cb463dd787581363b8ed1f4e94710 # 第一周 第一节 项目作业 提交 ## 养成良好的学习习惯 ## 多做笔记和文档 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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202.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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202.md" new file mode 100644 index 0000000000000000000000000000000000000000..ac99e0f8c2094295428dc65f42ea68868523c164 --- /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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202.md" @@ -0,0 +1,139 @@ +# 第一周-第三节课-随堂笔记 +# 变量和赋值 +- 什么是变量 + - 一个实体的指代 + - 查看变量的内存地址 + ```python + id(x) + ``` +- 变量赋值 + - 通过 = 来赋值 + ```python + a = 3 + ``` + - 被重新赋值后的值去哪了? + - 被系统回收了 +- Python的常量 + - Python没有常量这个数据类型 + - 程序猿之间的约定,如果变量名为大写,则这个变量就是常量 + +# Python的六大基本数据类型 +> 强调基本的原因数据类型和数据结构指向的范围更加广泛,不要产生错误的认知,行成思维定式 + +* 通过type()函数来查看当前变量的数据类型 +* `int` (整数) + ```python + int('1') + ``` +* `float` (浮点型) + ```python + float('1.0') + float('INF') + ``` + - 计算机只认识0和1,所以浮点数强调的是小数形式 +* `string` (字符串,字符序列) + - 在某些语言中,单个字符也是一个基本的数据类型 例如(char) + - 有序的 + - 如何表示字符串 + - '' + - "" + - '''''' + - """""" + - 转义字符 + > 告诉python解析器,我们当前要表示的是一个字符或者是特殊字符 + - 通过 \ 来转义 + ```python + "2\"" + "2\n" + ``` +* `boolean` (布尔值) + ```python + bool(1) + bool(0) + ``` + 用来表示 True 或者 False + - True 等价于 1 + - False 等价于 0 +* `bytes` (二进制序列) + ```python + bytes('hello'.encode('utf-8')) + b'hello' + ``` + **二进制表示形式** +* `None` (空) + - 有了 `False`和`0`,为什么还有`None`? + + 因为None有时候也代表一种结果 +# Python的四大基本数据结构 +* `list` (列表) + - 何为列表? + + 用来存 **不同数据类型** 的数据集结构 + - 列表特点 + - 有序的 + - 可以存任意的数据类型 + - 可以更改的(不可哈希) + - 如何表示list: + - 通过 `list()` 函数新建一个列表 + ```python + list('Hello') + ``` + - 通过 `[]` 声明一个列表 + ```python + a = [1, 2, 3] + ``` +* `tuple` (元祖) + - 何为元祖? + + 简单认为元祖就是不可修改的列表,常用用来记录 + - 元祖的特点? + - 有序的 + - 可以存任意的数据类型 + - 不可更改(可哈希) + - 如何表示 `tuple`元祖? + - 通过`tuple()` 新建一个元祖 + ```python + tuple('Hello') + ``` + - 通过 `(,)` 声明一个元祖 + ```python + a = (1, 2, 3) + # 声明单个元素的元祖,要添加逗号 + a = (1, ) + ``` +* `dict` (字典) + - 何为字典? + + 字典也做`hashtable`,通过`hash(散列)`h函数 + - 字典的特点? + - 无序的 + - 字典中的`key`必须是可`hash`的,也就是不可更改唯一的 + - `value` 是可以更改的 + - 如何表示字典? + - 通过`dict()`来创建字典 + ```python + dict(a=2) + >>> {'a': 2} + ``` + - 通过 `{}` 声明一个字典 + ```python + a = {'a': 2} + ``` +* `set` (集合) + - 什么是`set`? + + `set`其实是没有`value`的字典 + - 集合的特点 + - 无序的 + - 集合中的`key`必须是可`hash`的 + - 可以更改的 + - 元素是唯一的 + - 如何表示`set` + - 通过`set()` 创建一个集合 + ```python + set([1, 2, 2]) + ``` + - 通过 `{}` 来表示 + ```python + {1, 2, 3} + ``` \ No newline at end of file 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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\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/2\347\217\255/2\347\217\255_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232.py" new file mode 100644 index 0000000000000000000000000000000000000000..c444c2b3e27976a87d360d2c3a09ea953a3c1780 --- /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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232.py" @@ -0,0 +1,11 @@ +print('Python中 3个 不可变数据类型: int(整型),string(字符串),tuple(元祖)') +print('Python中 3个 可变数据类型: list(列表),dict(字典),set(集合)') + +s = {1, '1', None, b'', False, 1.1} # set 集合 +l = [1, '1', 1.1, None, b'', False] # list 列表 +d = {'a': 1, 'b': 1.1, 'c': False, 'd': None, 'e': b'', 'f': '1'} # dict 字典 +t = (1, 1.1, '1', False, None, b'') # tuple元祖 +print(s) +print(l) +print(d) +print(t) \ No newline at end of file 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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.md" new file mode 100644 index 0000000000000000000000000000000000000000..3f9b868e428a9f2f9b0ce9e0e10e00aa940e8dde --- /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_Super_Coding/week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.md" @@ -0,0 +1,170 @@ +# 第一周-第二节-笔记 +## GIT? +最强大的**分布式** **版本控制**流程 + +- 分布式 + + 分布式的意思就是大家fork之后的库, 就像细胞分裂一样, 彼此之间是平等, 可以互相合并代码. + + 我们`fork`远程库之后, 当前这个库就已经属于我们自己了. + + ``` + * 为了教学方便, 我们人为地设置了码育谷远程库作为我们的主库. + ``` + +- 版本控制 + + 通过分支切换, 来完成对不同版本的代码控制 + +## 日常工作使用GIT? + +- 安装git + + ``` + https://git-scm.com/download + ``` + +- 将git添加到环境变量 + + ``` + xxx\Git\cmd + ``` + +- 如何在`Pycharm`中配置git + + ``` + https://jingyan.baidu.com/article/ff42efa9c7bd12c19e22028a.html + ``` + + - 查看安装的路径 + + ``` + - where git + - which git + ``` + +- 如何使用git + + - 本地上传到远程库 + + - 在代码托管平台新建远程库 + + - 配置用户(一个环境只用配置一次) + + - 初始化一个git仓库(本地代码仓库) + + ``` + git init + ``` + + - 配置远程仓库(远程代码仓库) + + ``` + git remote add origin https://gitee.com/tunangit/git_test.git + ``` + + - 新建`.gitignore`文件 + + 用来屏蔽不需要提交到项目的文件和文件夹 + + - 默认要屏蔽的文件和文件夹 + - `.idea` + - `.git` + - `/venv/` + - `/test` + - `*/__pycache__/` + + - 选择要提交的项目文件 + + - 批量全部添加(不建议) + + ``` + git add ./* + ``` + + - 添加单个文件 + + ``` + git add xx/xx + ``` + + - 通过Pycharm手动添加 + + - 提交项目 + + - commit + + 提交到你的本地库 + + - push + + 提交到远程库 + + - commit and push + + 二合一, 提交到本地库和远程库 + + - 远程库同步到本地库 + + ``` + https://gitee.com/xxx/xxxx.git + ``` + + - 更新代码 + + ``` + git pull + ``` + + - 解决代码冲突 + + 当本地代码更新时发现和远程代码有冲突 + + - 左边是本地当前的代码 + - 右边是远程库的代码 + - 中间是最后选取的结果 + + - 历史回滚 + + - 右键目标文件或者文件夹, 点击history + - 回滚部分代码 -> 在弹出矿口右侧进行修改 + - 整个文件回滚 -> 右键revert + + - **注意事项** + + - 一定要先新建`.gitigonre` + - 不要在服务器/生产环境下直接修改代码 + +## python的虚拟环境 + +``` +*新建一个新项目的时候, 一定要先新建一个虚拟环境 +``` + +一个与系统环境隔离的空间 + +- 虚拟环境的好处 + + - 与系统环境隔离, 不会污染正式环境 + - 更新项目方便简洁 + - 通过`requirements.txt`解决不同平台, 不同环境下的环境同步问题 + +- 新建虚拟环境 + + ``` + python -m venv venv + ``` + +- 激活虚拟环境 + + ``` + # windows + venv\Scripts\Activate.bat + + # unix (mac, ubuntu, centos) + source venv/bin/activate + ``` +- 退出虚拟环境 + ``` + deactivate + ``` 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_Super_Coding/week2/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202-\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/2\347\217\255/2\347\217\255_Super_Coding/week2/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232.py" new file mode 100644 index 0000000000000000000000000000000000000000..bbe1c5cb4c75e68c2ce99943ed750d1c6cae961d --- /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_Super_Coding/week2/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202-\344\275\234\344\270\232.py" @@ -0,0 +1,66 @@ +import math + +def add(a: int, b: int)-> int: + """ + 加法运算 + """ + return a + b + +def subtract(a:int, b:int)->int: + """ + 减法运算 + """ + return a - b + +def ride(a:int, b:int)-> int: + """ + 乘法运算 + """ + return a * b + +def divide(a:int, b:int)-> int: + """ + 除法运算 + """ + return a / b + +def double_div(a:int, b:int)-> int: + """ + 整除运算 + """ + return a // b + +def surplus(a:int, b:int)-> float: + """ + 取余运算 + """ + return a % b + +def excract(a:int): + """ + 开方运算 + """ + return math.sqrt(a) + + +if __name__ == "__main__": + result1 = add(1, 2) + print(result1) + + result2 = subtract(5, 2) + print(result2) + + result3 = ride(3, 2) + print(result3) + + result4 = divide(5, 2) + print(result4) + + result5 = double_div(5, 2) + print(result5) + + result6 = surplus(10, 5) + print(result6) + + result7 = excract(2) + print(result7) \ No newline at end of file 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_Super_Coding/week2/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260.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_Super_Coding/week2/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..9c15debb85ca45313f8ddead873c828e1ba51dea --- /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_Super_Coding/week2/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260.md" @@ -0,0 +1,152 @@ +# 第二周-第一节 +## Python函数的基本介绍 +* 什么是函数? + + 函数就是一段定义的流程:输入数据,得到结果。在现实生活中,函数可以体现在方方面面。对厨师来讲,每一个菜谱都是函数;对农民来讲,每一种种菜的方法都是函数;对建筑工人来讲,每一个结构的修建都是函数;对司机来讲,在不同路线上的驾驶方式也是函数。 + + * 简单地说就是一个可以重复调用的代码片段。 + * 可以互相调用的代码片段 +* 函数的作用 + * 复用代码段 + +* **Python**中定义函数: + ```python + def foo(arg): + return "Hello" + str(arg) + ``` +* 函数组成 + * 参数 + * 必须参数 + + 参数必须**按顺序**传入 + * 关键字参数 + + 根据关键字参数传参可以不按顺序 + ```python + def foo(arg=None, args=None): + return "Hello" + str(arg) + ``` + * 默认参数 + ```python + def foo(arg='Super',args='Coding'): + return "Hello" + str(arg) + ``` + * 不定长参数 + > 在装饰器中会大量使用 + + 可以接受任意长度的参数 + + * **'*'** + 代表省略,打印参数为 **tuple** 元祖类型 + ```python + def foo(*args, **kwargs): + print(args) + print(kwargs) + return None + foo('Super', 'Coding', class_1='字典', class_2='字典2') + ('Super', 'Coding') + {'class_1': '字典', 'class_2': '字典2'} + ``` + * '**' + 两星号代表 dict字典类型参数 + ```python + def foo(*args, **kwargs): + print(args) + print(kwargs) + return None + foo('Super', 'Coding', class_1='字典', class_2='字典2') + ('Super', 'Coding') + {'class_1': '字典', 'class_2': '字典2'} + ``` + +* 返回值 + + 返回结果,默认返回 **None** + ```python + return None + ``` + 一个函数可以没有return 语句,可以有一个return 语句,也可以有多个return 语句 + + 一旦程序运行到return那么函数就会结束,return后面的代码永远不会被执行。 + +# Python运算符 +* 算术运算 + * `+` + * `-` + * `*`(乘法) + * `/`(除法) + * `//`(整除) + * `%`(取余) + * `**`(x的y次幂) + * `abs()`取绝对值 +* 赋值运算 + + 通过 = (等号) 赋值 + ```python + a = 1 + ``` +* 比较运算 + * `<` 小于 + * `>` 大于 + * `<=` 小于等于 + * `>=` 大于等于 + * `==` 等于 + * `!=` 不等于 + +* 标识号比较运算 + #### 比较两个变量的内存地址 + * `is` + * `is not` + * 赋值类型为 `str`,`int` 的时候需要考虑`python`的常量池 + ```python + a = 'a' + b = 'b' + a is b + >>> False + a = 123 + b = 123 + a is b + >>> True + ``` +* 成员检测运算 + + 判断元素是否在当前的序列中 + * `in` + ```python + a = [1,2,3] + 1 in a + >>> True + b = [1,2] + b in a + >>> False + ``` + * `not in` + +* 布尔运算 + + 判断当前语句的结果是`True`还是`False` + * `and` + + 只有两边都是`True`才返回`True` + + * `or` + + 两边表达式有一个是`True`返回的结果为`True` + * 短路 + ```python + 表达式A or 表达式B + 当表达式A为True时,表达式B就不会执行 + ``` + * `not` + + 逻辑取反 + +* 位运算 + + * `~` + * `^` + * `>>` + * `&` + * `|` + + 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_Wong/96d5d2687df83fd2e0830a1131365a6.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_Wong/python\347\216\257\345\242\203\345\217\230\351\207\217\351\205\215\347\275\256\346\210\252\345\233\276.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_Wong/96d5d2687df83fd2e0830a1131365a6.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_Wong/python\347\216\257\345\242\203\345\217\230\351\207\217\351\205\215\347\275\256\346\210\252\345\233\276.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_Wong/\345\216\206\345\217\262\345\233\236\346\273\232.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_Wong/\345\216\206\345\217\262\345\233\236\346\273\232.png" new file mode 100644 index 0000000000000000000000000000000000000000..160655e72fb1e4a3d6c6cc7531cef53421c9d552 Binary files /dev/null and "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_Wong/\345\216\206\345\217\262\345\233\236\346\273\232.png" differ 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_Wong/\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221.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_Wong/\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221.png" new file mode 100644 index 0000000000000000000000000000000000000000..e965d51d7284453c032fff3cbfb5feb26b231846 Binary files /dev/null and "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_Wong/\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221.png" differ 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_Wong/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\257\276.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_Wong/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\257\276.py" new file mode 100644 index 0000000000000000000000000000000000000000..c90c7ba75e7fe85e9e77a01191dba40f820f04e6 --- /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_Wong/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\257\276.py" @@ -0,0 +1,19 @@ +aa = True +bb = b'hello world!' +cc = None + +a = [3, 3.14, 'hello world', aa, bb, cc] +b = (3, 3.14, 'hello world', aa, bb, cc) +c = { + "a01":3, + "a02":3.14, + "a03":'hello world', + "a04":aa, + "a05":bb, + "a06":cc, +} +d = {3, 3.14, 'hello world', aa, bb, cc} +print(a) +print(b) +print(c) +print(d) 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_Wong/\347\254\254\344\272\214\345\221\250\347\254\254\344\270\200\350\257\276.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_Wong/\347\254\254\344\272\214\345\221\250\347\254\254\344\270\200\350\257\276.py" new file mode 100644 index 0000000000000000000000000000000000000000..815c3c74cd56593d05ca8feb61c3eea483b0d76c --- /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_Wong/\347\254\254\344\272\214\345\221\250\347\254\254\344\270\200\350\257\276.py" @@ -0,0 +1,53 @@ + +#加法运算 +def add(a, b): + c = a + b + return c + +result = add(2, 5) +print(result) + + +#减法运算 +def sub(a, b): + c = a - b + return c + +result = sub(8, 5) +print(result) + + +#乘法运算 +def mul(a, b): + c = a * b + return c + +result = mul(2, 3) +print(result) + + +#除法运算 +def div(a, b): + c = a / b + return c + +result = div(8, 2) +print(result) + + +#取余运算 +def rem(a, b): + c = a % b + return c + +result = rem(7, 3) +print(result) + + +#开方运算 +def pre(a): + c = a ** (1/2) + return c + +result = pre(9) +print(result) 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_Wong/e3633e1b045779695ca9ca5477c5f15.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_Wong/\350\277\220\350\241\214\350\276\223\345\207\272\342\200\234hello world\342\200\235\346\210\252\345\233\276.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_Wong/e3633e1b045779695ca9ca5477c5f15.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_Wong/\350\277\220\350\241\214\350\276\223\345\207\272\342\200\234hello world\342\200\235\346\210\252\345\233\276.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_Wong/\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.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_Wong/\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..eff74571d6641e1d55485e9bd5ae23e6baf3d0cb Binary files /dev/null and "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_Wong/\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" differ diff --git "a/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202.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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/.keep" similarity index 100% rename from "\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202.md" 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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/.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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/basic_data_types.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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/basic_data_types.py" new file mode 100644 index 0000000000000000000000000000000000000000..e70a1e14a2602e2521f993a84cd8c371c14c4ae4 --- /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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/basic_data_types.py" @@ -0,0 +1,50 @@ +# basic data structures: list, tuple, dict, set +# basic data types: int, float, string, boolean, bytes, None +# +# Q1: Which data structures in python are mutable? +# mutable: list dict set +# immutable: tuple +# +# Q2: Which data structures in python are ordered? +# ordered: list tuple +# unordered: set dict + +# constants +con_int = 1 +con_float = 2.0 +con_boolean = True +con_string = "Hello world" +con_bytes = bytes(con_string, 'utf-8') + +# a list of 6 data types +homework_list = [ + con_int, con_float, con_string, + con_boolean, con_bytes, None, + ] + +# a tuple of 6 data types +homework_tuple = ( + con_int, con_float, con_string, + con_boolean, con_bytes, None, + ) + +# a dict of 6 data types +homework_dict = { + con_int: 1, + con_float: 2.0, + con_boolean: True, + con_string: "Hello world", + con_bytes: "Hello world", + None: None, + } + +# a set of 6 data types +homework_set = { + con_int, con_float, con_string, + con_boolean, con_bytes, None, + } + +print(homework_list) +print(homework_tuple) +print(homework_dict) +print(homework_set) \ No newline at end of file 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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/.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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/.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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/private_repo.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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/private_repo.png" new file mode 100644 index 0000000000000000000000000000000000000000..0671e7bb53c05b67a25d3b0131a653fcf47d8203 Binary files /dev/null and "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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/private_repo.png" differ 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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/python_venv.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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/python_venv.png" new file mode 100644 index 0000000000000000000000000000000000000000..5a724147ac2d1ce18599aeed505aca0576aaf2e0 Binary files /dev/null and "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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/python_venv.png" differ 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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/python_venv_directory.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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/python_venv_directory.png" new file mode 100644 index 0000000000000000000000000000000000000000..35f8f881350ecc2e745488ae80d664eb4ab490e1 Binary files /dev/null and "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_chaos/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/python_venv_directory.png" differ 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_spiderchen/Week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\350\257\276\345\220\216\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/2\347\217\255/2\347\217\255_spiderchen/Week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\232.py" new file mode 100644 index 0000000000000000000000000000000000000000..3457d64757e83d7879df94fb0b04ce046aab58b7 --- /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_spiderchen/Week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\232.py" @@ -0,0 +1,41 @@ +""" +1.四大基本数据结构中哪些是可变的,哪些是不可变的? +可变的基本数据结构:List,Dict,Set +不可变的基本数据结构:Tuple + +2.四大基本数据结构中哪些是有序的,哪些是无序的? +有序的基本数据结构:List,Tuple +无序的基本数据结构:Dict,Set + +3.六大基本数据类型 +整数 +浮点数 +字符串 +布尔值 +二进制序列(bytes) +空() + +4.四大基本数据结构 +列表(List) +元组(Tuple) +字典(Dict) +集合(Set) +""" + +# tuple +a = (1,) +b = (1.2, 'abc', True, None, bytes('hello world'.encode("utf-8"))) +print(b[4]) + +# list +c = [1] +d = [1.2, 'abc', False, None, bytes('hello world'.encode("utf-8"))] +print(d[4]) + +# dict +e = {'a': 1, 1.6: 2, 'c': bytes('hello world'.encode("utf-8")), 10: 4, 'm': None} +print(e['m']) + +# set +f = {'a', 1.6, bytes('hello world'.encode("utf-8")), None, 6, True, 666} +print(f) \ No newline at end of file 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_spiderchen/Week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2321.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_spiderchen/Week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2321.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..d5cda35234b2d976b4031ac98b89f42bea263dd6 Binary files /dev/null and "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_spiderchen/Week1/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2321.PNG" differ 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_spiderchen/Week1/\347\254\254\344\272\214\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2322.1.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_spiderchen/Week1/\347\254\254\344\272\214\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2322.1.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..128031f4956241d7f58bb961e9832c5134cebe75 Binary files /dev/null and "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_spiderchen/Week1/\347\254\254\344\272\214\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2322.1.PNG" differ 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_spiderchen/Week1/\347\254\254\344\272\214\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2322.2.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_spiderchen/Week1/\347\254\254\344\272\214\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2322.2.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..8dc3af07b31a6e20d2e0fe4621e71180da5f3ee1 Binary files /dev/null and "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_spiderchen/Week1/\347\254\254\344\272\214\345\221\250_\347\254\254\344\272\214\350\212\202_\350\257\276\345\220\216\344\275\234\344\270\2322.2.PNG" differ 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_spiderchen/Week2/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_spiderchen/Week2/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..0847caf93912bbbebe19ca2895732a0961b0e2c0 --- /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_spiderchen/Week2/my_calculator.py" @@ -0,0 +1,69 @@ +""" +第二周_第一节_课后作业 +""" + + +def addition(a, b): + result = a + b + return result + + +def subtraction(a, b): + result = a - b + return result + + +def multiplication(a, b): + result = a * b + return result + + +def division(a, b): + result = a / b + return result + + +def exact_division(a, b): + result = a // b + return result + + +def modulus(a, b): + result = a % b + return result + + +def exponent(a, b): + result = a ** b + return result + + +def sqrt(a): + result = a ** (1/2) + return result + + + +z = addition(1, 2) +print(z) + +y = subtraction(5, 6) +print(y) + +x = multiplication(5, 7) +print(x) + +m = division(9, 3) +print(m) + +n = exact_division(123, 51) +print(n) + +o = modulus(5, 4) +print(o) + +p = exponent(2, 8) +print(p) + +r = sqrt(625) +print(r) \ No newline at end of file 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_\344\277\212\347\204\272/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_\344\277\212\347\204\272/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..f329c73b8b17d29d3bac47e496297d0a1409597a --- /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_\344\277\212\347\204\272/my_calculator.py" @@ -0,0 +1,22 @@ +def add(a, b): + print(a+b) +#加法 +def minus(a, b): + print(a-b) +#减法 +def mul(a, b): + print(a*b) +#乘法 +def div(a, b): + print(a/b) +#除法 +def amul(a, b): + print(a//b) +#整除 +def yu(a, b): + print(a%b) +#取余 +def pre(a, b): + print(a**b) +#开方 + 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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2542\350\257\276\344\275\234\344\270\232/1-\346\226\260\351\241\271\347\233\256\350\231\232\346\213\237\347\216\257\345\242\203.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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2542\350\257\276\344\275\234\344\270\232/1-\346\226\260\351\241\271\347\233\256\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..aea261b3dbf5c01c6d9a356327bb9d62611a4952 Binary files /dev/null and "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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2542\350\257\276\344\275\234\344\270\232/1-\346\226\260\351\241\271\347\233\256\350\231\232\346\213\237\347\216\257\345\242\203.png" differ 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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2542\350\257\276\344\275\234\344\270\232/2-\345\273\272\347\253\213git\357\274\214\346\217\220\344\272\244\345\210\260\347\240\201\344\272\221.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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2542\350\257\276\344\275\234\344\270\232/2-\345\273\272\347\253\213git\357\274\214\346\217\220\344\272\244\345\210\260\347\240\201\344\272\221.png" new file mode 100644 index 0000000000000000000000000000000000000000..1d85267a4cb79a0210c251e3927371d1ddf191ff Binary files /dev/null and "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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2542\350\257\276\344\275\234\344\270\232/2-\345\273\272\347\253\213git\357\274\214\346\217\220\344\272\244\345\210\260\347\240\201\344\272\221.png" differ 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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/3.\345\256\236\344\276\213.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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/3.\345\256\236\344\276\213.png" new file mode 100644 index 0000000000000000000000000000000000000000..3959b54e774e758613a319dca377f6a62c67b34f Binary files /dev/null and "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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/3.\345\256\236\344\276\213.png" differ 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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/~$ Microsoft Word \346\226\207\346\241\243.docx" "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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/~$ Microsoft Word \346\226\207\346\241\243.docx" new file mode 100644 index 0000000000000000000000000000000000000000..940e621abfb6733ca5dcff9773bffbc0a94995b1 Binary files /dev/null and "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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/~$ Microsoft Word \346\226\207\346\241\243.docx" differ 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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\347\254\2541\345\221\250\347\254\2543\350\212\202\350\257\276\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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\347\254\2541\345\221\250\347\254\2543\350\212\202\350\257\276\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..fe8ded28754066eb188232748db245f8be034a7c --- /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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\347\254\2541\345\221\250\347\254\2543\350\212\202\350\257\276\344\275\234\344\270\232.md" @@ -0,0 +1,26 @@ +# 1.四大基本数据结构中哪些是可变的,哪些是不可变的? + +## ①元素可变的数据结构:list(列表)、dict + +### list改变元素方式:a=["1",“2”]、list("") + +#### 在末尾添加a.append("x"), + +#### 在列表中添加a.insert(0,"x") + +#### 在列表中删除del a[0]、a.pop(0)、a.remove("x") + +### dict可添加、改变、删除key值,但key是唯一的、不可更改。 + +## ②元素不可变的数据结构:tuple(元组)、set。 + + + +# 2.四大基本数据结构中哪些是有序的、哪些是无序的? + +## 有序的:list,tuple + +## 无序的:set,dict + + + 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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232.docx" "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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232.docx" 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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\2543\350\212\202\350\257\276\344\275\234\344\270\232\347\254\2543\351\227\256.py.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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\2543\350\212\202\350\257\276\344\275\234\344\270\232\347\254\2543\351\227\256.py.py" new file mode 100644 index 0000000000000000000000000000000000000000..cc0753acbc852329e77fba2ff01654d50fb24bb7 --- /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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\2543\350\212\202\350\257\276\344\275\234\344\270\232\347\254\2543\351\227\256.py.py" @@ -0,0 +1,18 @@ +g=True +t=b"hello" +ff=None +list1=["a","2","1.0",g,t,ff] +tuple2=("a",2,1.0,g,t,ff) +dict3={ + "a":"aa", + "b":34, + "c":1.0, + "d":True, + "e":b"hello", + "f":None +} +set4={"a",2,1.0,g,t,ff} +print(list1) +print(tuple2) +print(dict3) +print(set4) 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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\357\274\2102\346\224\271\357\274\211\347\254\254\344\270\200\345\221\250\347\254\2543\350\212\202\350\257\276\344\275\234\344\270\232\347\254\2543\351\227\256.py.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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\357\274\2102\346\224\271\357\274\211\347\254\254\344\270\200\345\221\250\347\254\2543\350\212\202\350\257\276\344\275\234\344\270\232\347\254\2543\351\227\256.py.py" new file mode 100644 index 0000000000000000000000000000000000000000..6cb76bb588c3fd014c93f1aca8963f9e1e6c43d9 --- /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_\344\277\212\347\204\272/\347\254\2541\345\221\250\347\254\2543\350\257\276\344\275\234\344\270\232/\357\274\2102\346\224\271\357\274\211\347\254\254\344\270\200\345\221\250\347\254\2543\350\212\202\350\257\276\344\275\234\344\270\232\347\254\2543\351\227\256.py.py" @@ -0,0 +1,18 @@ +g = True +t = b"hello" +ff = None +list1 = ["a", "2", "1.0", g, t, ff] +tuple2 = ("a", 2, 1.0, g, t, ff) +dict3 = { + "a": "aa", + "b": 34, + "c": 1.0, + "d": True, + "e": b"hello", + "f": None +} +set4 = {"a", 2, 1.0, g, t, ff} +print(list1) +print(tuple2) +print(dict3) +print(set4) 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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/2ed week work mistakes.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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/2ed week work mistakes.md" new file mode 100644 index 0000000000000000000000000000000000000000..694228083beb46065545e08868e59e862c1b7c5e --- /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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/2ed week work mistakes.md" @@ -0,0 +1,41 @@ +# 2ed week work mistakes + +## 1.变量与运算符之间要空格 + +## 2.函数与函数之间空两行 + +``` +def add(a, b): + print(a+ b) +#加法 + + +def minus(a, b): + print(a - b) +#减法 + + +def mul(a, b): + print(a * b) +#乘法 + + +def div(a, b): + print(a / b) +#除法 + + +def amul(a, b): + print(a // b) +#整除 + + +def yu(a, b): + print(a % b) +#取余 + + +def pre(a, b): + print(a ** b) +#开方 +``` \ No newline at end of file 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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/\357\274\2102\346\224\271\357\274\211my_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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/\357\274\2102\346\224\271\357\274\211my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..d88e97d5538a1a97827d5025fbe462d9d1f856d9 --- /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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/\357\274\2102\346\224\271\357\274\211my_calculator.py" @@ -0,0 +1,51 @@ +#加法 +def add(a, b): + print(f"{a} + {b} =" ) + print(a + b) +add(3, 4) +#加法 + + +def minus(a, b): + print(f"{a} - {b} =") + print(a - b) +minus(1, 5) +#减法 + + +def mul(a, b): + print(f"{a} * {b} =") + print(a * b) +mul(5, 7) +#乘法 + + +def div(a, b): + print(f"{a} / {b} =") + print(a / b) +div(8, 2) +#除法 + + +def amul(a, b): + print(f"{a} // {b} =") + print(a // b) +amul(4, 7) +#整除 + + +def yu(a, b): + print(f"{a} % {b} =") + print(a % b) +yu(7, 8) +#取余 + + +def pre(a, b): + print(f"{a} ** {b} =") + print(a ** b) +pre(7, 9) +#开方 + + + 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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/\357\274\210\346\224\271\357\274\211my_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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/\357\274\210\346\224\271\357\274\211my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..ae561b095d2658ac181a90cb9ae79e5ab4f82f13 --- /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_\344\277\212\347\204\272/\347\254\2542\345\221\250\347\254\2541\350\257\276\344\275\234\344\270\232/\357\274\210\346\224\271\357\274\211my_calculator.py" @@ -0,0 +1,36 @@ +def add(a, b): + print(a + b) +#加法 + + +def minus(a, b): + print(a - b) +#减法 + + +def mul(a, b): + print(a * b) +#乘法 + + +def div(a, b): + print(a / b) +#除法 + + +def amul(a, b): + print(a // b) +#整除 + + +def yu(a, b): + print(a % b) +#取余 + + +def pre(a, b): + print(a ** b) +#开方 + + + 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_\345\260\217\345\261\213/shili.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_\345\260\217\345\261\213/shili.py" new file mode 100644 index 0000000000000000000000000000000000000000..f805d0463c3f3885f99fa381e05f574f34e44a34 --- /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_\345\260\217\345\261\213/shili.py" @@ -0,0 +1,12 @@ +a = 1 +b = 2.0 +c = ('3') +d = True +e = False +f = None +list = (a,b,c,d,e,f) +tuple = (a,b,c,d,e,f) +set = {a,b,c,d,e,f} +print(list) +print(tuple) +print(set) \ No newline at end of file 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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/notebook.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/notebook.md" new file mode 100644 index 0000000000000000000000000000000000000000..0adc7117ddfad95382a17ec6c9f231fe81cd5d80 --- /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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/notebook.md" @@ -0,0 +1,259 @@ +# 第一周_第三节课 + +## 变量和赋值 + +- 什么是变量 + + - 一个实体的指代 + + - 查看变量的内存地址 + + ``` + id(x) + ``` + + - 可变化的 可重新赋值 + +- 为变量赋值 + + - 通过 = 来赋值 + + ``` + x = 3 + ``` + + - 被重新赋值之后的值去哪儿了 + + - 被系统回收了 + +- python的常量 + + - python没有常量这个数据类型 + - 程序员之间的约定,如果这个命名都是大写字母,那么就视为一个常量 + +## python的六大基本类型 + +``` +*强调基本的原因 数据类型和数据结构指向的范围更广泛(像堆,栈,树),不要产生错误的认知,形成思维定式 +``` + +- 通过type函数来查看当前变量的数据类型 + +- **int(整数)** + + ``` + int("1") + ``` + +- **float(浮点数** + + ``` + float("1.0") + ``` + + - 因为计算机只认识0和1,所以浮点数强调的是小数的表现形式 + + - 表现无限 + + ``` + float("INF") + ``` + + + +- **string(字符串,字符序列)** + + ``` + str() #转换数据类型 + ``` + + - 在有些语言中,单个字符也是一个基本的数据类型(char),python中没有 + + - 有序的 + + - 如何表示字符串 + + - ``` + '' + ``` + + - ``` + "" + ``` + + - ``` + '''''' + ``` + + - ``` + """""" + ``` + + - 转义字符 + + - 告诉python解释器 我们当前表示的是一个字符或者是特殊字符 + + - 通过\来转义 \n 换行 + + ``` + "2\"" + "2\n3" + ``` + +- **boolean(布尔值)** + + 用来表示True 或者 False + + - ``` + True = 1 + True + False == 0 + True + ``` + + - true 等价于 1 False 等价于 0 + +- **bytes(二进制序列)** + + - 二进制表现形式 + +- **None(空) #比较重要,后面应用很多** + + - 有了False和0为什么还要有None + + 因为False和0有时候也代表了一种结果 + +## python的四大基本数据结构 + +- **list(列表)** + + - 什么是列表 + + 用来装载不同数据类型的数集结构 + + - 列表的特点 + + - 有序的 + - 可以装载任意数据类型 + + - 如何让表示list + + - 通过list()新建一个列表 + + - 通过[]声明一个列表 + + ``` + list() + [] + a = [1,2,3] + type(a) + + ``` + +- **tuple(元组)** + + - 什么是元组 + + 简单地认为,元组是不可修改得列表,常用来表示记录 + + - 元组的特点 + + - 有序的 + - 可以装载任意数据;类型 + - 不可修改 + + - 如何表示tuple + + - 通过tuple()新建一个元组 + + - 通过(,)来声明一个元组 + + ``` + tuple("hallo") + ('h', 'a', 'l', 'l', 'o') + + a = (1,2) + a + (1, 2) + + type(a) + + ``` + + - 声明单个元素的元组,要添加逗号 + + ``` + a = (1,) + a + (1,) + type(a) + + ``` + + + +- **dict(字典)** + + - 什么是字典 + + 字典也叫hashtable ,通过hash(散列)函数将传入的key值生成地址来查找value + + key -> hash 函数 -> 返回了value的地址 -> 通过地址返回value值 + + - 字典的特点 + + - 无序的 #python3.6是有序的,无视这一点 + - 字典中的key 必须是可哈希的 + - 其本身是可以更改的 + + - 如何表示字典 + + - 通过dict()函数来创建字典 + + - 通过{}来声明一个字典 + + ``` + dict() + {} + + a = {"a":1} + type(a) + + ``` + + + +- **set(集合)** + + - 什么是set + + - 其实是没有value的字典 + + - 集合的特点 + + - 无序的 + - 集合中的key必须是可hash的 + - 元素是唯一的 + + - 如何表示set + + - 通过set()函数来创建集合 + + - 通过{}来声明一个集合 + + ``` + set({1,2}) + {1, 2} + + a = {"a",1} + type(a) + + ``` + +- **课后作业** + + - 四大基本数据结构中哪些是可变的,哪些是不可变的 + - 可变的 list dict 不可变的 tuple set + - 四大基本数据结构中哪些是有序的,哪些是无序的 + - 有序的 list tupple 无序的 dict set + - 创建set,list,dict.tuple实例,每个数据结构中的实例需要包括六大基本数据类型(有一个是没办法包含数据结构的) \ No newline at end of file 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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/shili.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/shili.py" new file mode 100644 index 0000000000000000000000000000000000000000..87ce1ce1d9d16867d13f058c3ea41e2bd857503c --- /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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/shili.py" @@ -0,0 +1,12 @@ +a = 1 +b = 2.0 +c = ('3') +d = True +e = False +f = None +list = (a, b, c, d, e, f) +tuple = (a, b, c, d, e, f) +set = {a, b, c, d, e, f} +print(list) +print(tuple) +print(set) \ No newline at end of file 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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/wenda.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/wenda.md" new file mode 100644 index 0000000000000000000000000000000000000000..7b4342d1218dad273711c62e2fb045f8d4bff0aa --- /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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/wenda.md" @@ -0,0 +1,4 @@ +- 四大基本数据结构中哪些是可变的,哪些是不可变的 + - 可变的 list dict 不可变的 tuple set +- 四大基本数据结构中哪些是有序的,哪些是无序的 + - 有序的 list tupple 无序的 dict set \ No newline at end of file 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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/\344\275\234\344\270\2321.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/\344\275\234\344\270\2321.png" new file mode 100644 index 0000000000000000000000000000000000000000..2be33bd6e0e0f1c4f28d171caf453d1b98b099ab Binary files /dev/null and "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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/\344\275\234\344\270\2321.png" differ 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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/\344\275\234\344\270\2322.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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/\344\275\234\344\270\2322.png" new file mode 100644 index 0000000000000000000000000000000000000000..3898fb72fac7a2a3b98fc4c01daa21aa05e8ef3f Binary files /dev/null and "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_\345\260\217\345\261\213/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/\344\275\234\344\270\2322.png" differ 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_\345\260\217\345\261\213/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232/job.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_\345\260\217\345\261\213/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232/job.py" new file mode 100644 index 0000000000000000000000000000000000000000..9ab32c0b34a894dfb933495c54e335d4c45164a4 --- /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_\345\260\217\345\261\213/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232/job.py" @@ -0,0 +1,49 @@ +def add(a, b): #加法运算 + return a + b + + +def subtract(c, d): #减法运算 + return c - d + + +def multiply(e, f): #乘法运算 + return e * f + + +def eliminates(g, h): #除法运算 + return g / h + + +def divide (o, p): #整除运算 + return o // p + + +def remainder(q, r): #取余运算 + return q % r + + +def sqr(s, t): #开方运算 + return s ** t + + +if _name_ == "_main_": + result1 = add(5, 6) + print(result1) + + result2 = subtract(5, 6) + print(result2) + + result3 = multiply(5, 6) + print(result3) + + result4 = eliminates(5, 6) + print(result4) + + result5 = divide(5, 6) + print(result5) + + result6 = remainder(5, 6) + print(result6) + + result7 = sqr(5, 6) + print(result7) \ No newline at end of file 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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/2\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_git.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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/2\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_git.png" new file mode 100644 index 0000000000000000000000000000000000000000..af754977c5526fdec14878aba91bd977f806f1bb Binary files /dev/null and "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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/2\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_git.png" differ 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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/2\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_venv.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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/2\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_venv.png" new file mode 100644 index 0000000000000000000000000000000000000000..e83f4f4022a3420edcf29261b90f66dcbb7fe603 Binary files /dev/null and "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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/2\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_venv.png" differ 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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/lesson3.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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/lesson3.py" new file mode 100644 index 0000000000000000000000000000000000000000..861bc8a91094e5104f186ca03427a0b5688cab3e --- /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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/lesson3.py" @@ -0,0 +1,25 @@ +# 创建一个列表list + +a = [1, 1.0, 'hello', True, b'', None] + +# 创建一个元组tuple + +b = (1, 1.0, 'hello', True, b'', None) + +# 建一个字典dict + +c = {'a': 1, 'b': 1.0, 'c': 'hello', 'd': True, 'e': b'', 'f': None} + +# 创建一个集合set + +d = {1, 1.0, 'hello', True, B'', None} + +# 验证一下 + +print(type(a), type(b), type(c), type(d)) + +print(a, b, c, d) + +# 测试了一下看了下结果,老师说的坑大概就出现在set这里。 +# 在set里面,0和False会被去重,1和1.0还有True也会被去重,最后都只会显示0和1。 +# 但是 b''和 b'\x00'还是会显示出来,所以有点不明白bytes到底是什么意思了,明明我的b''和b'\x00'是通过bytes(0)和bytes(1)给转化过来的。 \ No newline at end of file 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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/\344\272\214\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\346\217\220\344\272\244.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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/\344\272\214\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\346\217\220\344\272\244.md" new file mode 100644 index 0000000000000000000000000000000000000000..63248b5de75e5f8fb7e4e115db4271404f99e3aa --- /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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\270\200\345\221\250/\344\272\214\347\217\255_\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\346\217\220\344\272\244.md" @@ -0,0 +1,14 @@ +- 四大基本数据结构中哪些是可变的,哪些是不可变的? + - 可变的 + - list(列表) + - dict(字典) + - set(集合) + - 不可变的 + - tuple(元组) +- 四大基本数据结构中哪些是有序的,哪些是无序的? + - 有序的 + - list(列表) + - tuple(元组) + - 无序的 + - dict(字典) + - set(集合) \ No newline at end of file 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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\272\214\345\221\250/.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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\272\214\345\221\250/.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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\272\214\345\221\250/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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\272\214\345\221\250/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..2d3b52fa28a5e1a5094642f5dfd9893cb2493011 --- /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_\345\260\217\351\243\236\344\276\240/\347\254\254\344\272\214\345\221\250/my_calculator.py" @@ -0,0 +1,58 @@ +# 加法 +def add(a, b): + return int(a) + int(b) + + +# 减法 +def sub(a, b): + return int(a) - int(b) + + +# 乘法 +def mul(a, b): + return int(a) * int(b) + + +# 除法 +def div(a, b): + return int(a) / int(b) + + +# 整除 +def exa(a, b): + return int(a) // int(b) + + +# 取余 +def rem(a, b): + return int(a) % int(b) + + +# 开方 +def sqrt(a, b): + return int(a) ** (1 / int(b)) + + +if __name__ == "__main__": + result_add = add(1, 2) + print(result_add) + + + result_sub = sub(1, 2) + print(result_sub) + + + result_mul = mul(1, 2) + print(result_mul) + + result_div = div(1, 2) + print(result_div) + + result_exa = exa(1, 2) + print(result_exa) + + result_rem = rem(1, 2) + print(result_rem) + + result_sqrt = sqrt(1, 2) + print(result_sqrt) \ No newline at end of file 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\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\2541\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\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\2542\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\2542\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\2542\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/01-pycharm\350\231\232\346\213\237\347\216\257\345\242\203.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\2542\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/01-pycharm\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..b87adad25d63f4f641687ca7a97556c65a3b645b Binary files /dev/null and "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\2542\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/01-pycharm\350\231\232\346\213\237\347\216\257\345\242\203.png" differ 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\2542\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/02-git\344\273\223\345\272\223.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\2542\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/02-git\344\273\223\345\272\223.png" new file mode 100644 index 0000000000000000000000000000000000000000..840792acae7af64c57f116188da8e29e5b34a62c Binary files /dev/null and "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\2542\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244/02-git\344\273\223\345\272\223.png" differ 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..8bf3b75ba6a635159e390fbc02007d70e5ab72a0 --- /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,58 @@ +# 第2周第1节课后作业 +# 1.加法 +def add(x, y): + return x + y + + +# 2.减法 +def sub(x, y): + return x - y + + +# 3.乘法 +def mul(x, y): + return x * y + + +# 4.除法 +def divide(x, y): + return x / y + + +# 5.整除 +def double_div(x, y): + return x // y + + +# 6.取余 +def surplus(x, y): + return x % y + + +# 7.开方 +def sqrt(x, y): + return x ** (1/y) + + +if __name__ == "__main__": + + result1 = add(2,3) + print(result1) + + result2 = sub(5,2) + print(result2) + + result3 = mul(4,6) + print(result3) + + result4 = divide(6,2) + print(result4) + + result5 = double_div(5,2) + print(result5) + + result6 = surplus(5,2) + print(result6) + + result7 = sqrt(36,2) + print(result7) \ No newline at end of file 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\233\246/\347\254\254\344\270\200\345\221\250/.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\233\246/\347\254\254\344\270\200\345\221\250/.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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.png" new file mode 100644 index 0000000000000000000000000000000000000000..ca5fb8cb3e94545323882b4fee0f143cb1d7900c Binary files /dev/null and "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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.png" differ 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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202.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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202.py" new file mode 100644 index 0000000000000000000000000000000000000000..46a342b16bb76e8fb63f1d0744fd0ad47cdd4636 --- /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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202.py" @@ -0,0 +1,21 @@ +# 1.四大基本数据结构中哪些是可变的, 哪些是不可变的? +# list,dict.set;是可变的, tuple 是不可变的. +# 2.四大基本数据结构中哪些是有序的, 哪些是无序的? +# 有序的是:list,tuple;无序:dict,set + +# 3.创建`set`, `list`, `dict`, `tuple`实例, 每个数据结构的实例需要包括六大基本类型. + +def my_main(): + list_test = [1, 2.00, "mmm", False, bytes(1), None] + print(f'my_list:{list_test}') + tuple_test = (1, 1, 2.00, "mmm", False, bytes(1), None,) + print(f'tuple:{tuple_test}') + dict_test = {1: 1, 2: "mypython", 3: True, 4: bytes(1), 5: None} + print(f'dict:{dict_test}') + set_test = {1, 1, 2.00, "mmm", False, bytes(1), None} + print(f'dict:{set_test}') + + +if __name__ == '__main__': + my_main() + 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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/.gitignore" "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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..8b9c4da2e8a25dbad6643b8de6a5d8288dcdcd55 --- /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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/.gitignore" @@ -0,0 +1,5 @@ +.idea +.git +/venv/ +/test/ +*/__pycache__/ \ No newline at end of file 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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.png" new file mode 100644 index 0000000000000000000000000000000000000000..d968995616ac929a7c05b1ad83e5b68da25fad51 Binary files /dev/null and "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\233\246/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.png" differ 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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/.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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/.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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-1.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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-1.png" new file mode 100644 index 0000000000000000000000000000000000000000..c9c2e6e131aa6cfe8381d351a0f9edf95b6db019 Binary files /dev/null and "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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-1.png" differ 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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-2.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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-2.png" new file mode 100644 index 0000000000000000000000000000000000000000..970f235457820636d31b5e17e6970aadb481facb Binary files /dev/null and "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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-2.png" differ 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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-3.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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-3.png" new file mode 100644 index 0000000000000000000000000000000000000000..6e999cc0a02eccbe0cc5a0b71574477f41a32335 Binary files /dev/null and "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_\350\212\212\345\260\217\350\212\212/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\200\345\221\250-\347\254\2542\350\212\202-3.png" differ 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_\351\231\210\347\224\237/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/.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_\351\231\210\347\224\237/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/.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_\351\231\210\347\224\237/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/git\344\270\212\344\274\240\351\241\271\347\233\256.jpg" "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_\351\231\210\347\224\237/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/git\344\270\212\344\274\240\351\241\271\347\233\256.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..63cce9eba118d5a7570d7399128a24142c8f0063 Binary files /dev/null and "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_\351\231\210\347\224\237/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/git\344\270\212\344\274\240\351\241\271\347\233\256.jpg" differ 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_\351\231\210\347\224\237/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203.jpg" "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_\351\231\210\347\224\237/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..6775a9886ba31b1a3834eb42e99129be3eef0bf4 Binary files /dev/null and "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_\351\231\210\347\224\237/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/python\347\216\257\345\242\203\345\217\230\351\207\217\346\220\255\345\273\2721.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202/python\347\216\257\345\242\203\345\217\230\351\207\217\346\220\255\345\273\2721.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/python\347\216\257\345\242\203\345\217\230\351\207\217\346\220\255\345\273\2721.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202/python\347\216\257\345\242\203\345\217\230\351\207\217\346\220\255\345\273\2721.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/python\347\216\257\345\242\203\345\217\230\351\207\217\346\220\255\345\273\2722.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202/python\347\216\257\345\242\203\345\217\230\351\207\217\346\220\255\345\273\2722.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/python\347\216\257\345\242\203\345\217\230\351\207\217\346\220\255\345\273\2722.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202/python\347\216\257\345\242\203\345\217\230\351\207\217\346\220\255\345\273\2722.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/.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/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/work.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/work.py" new file mode 100644 index 0000000000000000000000000000000000000000..853ec9bc31a67efbdfbf1453ce6612dee045c66d --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202/work.py" @@ -0,0 +1,8 @@ +list1=[1,2.2,'Sunday',b'Hello World',True,None] +print(list1) +tuple1=(1,2.2,'Sunday',b'Hello World',True,None) +print(tuple1) +dict1={'a':1,'b':2.2,'c':'Sunday','d':b'Hello World','e':True,'f':None} +print(dict1) +set1={1,2.2,'Sunday',b'Hello World',True,None} +print(set1) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/.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/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\344\270\212\344\274\240\351\241\271\347\233\256.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\344\270\212\344\274\240\351\241\271\347\233\256.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..8b203a0571f8a3a8add6119a2fb12b8408a9ae28 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\344\270\212\344\274\240\351\241\271\347\233\256.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\344\273\223\345\272\223.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\344\273\223\345\272\223.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..ed566601b03f497f1af23cbe07ca13e8d1cda60f Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\344\273\223\345\272\223.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\2031.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\2031.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..f5b480711b4297a741b79d30ce7fd833389f27ae Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\2031.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\2032.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\2032.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..f07f1f9d3880f50b44ef6a04f5d791bb46af2664 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202/\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\2032.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/.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/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/my_calculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..1eb52abd5294255aab61315313da0bb4dcc08d78 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_DDDDian/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/my_calculator.py" @@ -0,0 +1,62 @@ +def add(x, y): + return x + y + + +def subtract(x, y): + return x - y + + +def multiply(x, y): + return x * y + + +def devide(x, y): + return x/y + + +def devide_int(x, y): + return x//y + + +def sqrt(x): + return x**0.5 + + +print("欢迎使用计算器") +print("1、加法") +print("2、减法") +print("3、乘法") +print("4、除法") +print("5、整除") +print("6、开方") + + +choice=input("请选择您要进行的运算(输入数字1-6):") +print("开始计算") + + +num1=int(input("请输入第一个数字:")) +num2=int(input("请输入第二个数字:")) + + +if choice == '1': + print(num1, "+", num2, "=", add(num1, num2)) + +elif choice == '2': + print(num1, "-", num2, "=", subtract(num1, num2)) + +elif choice == '3': + print(num1, "*", num2, "=", multiply(num1, num2)) + +elif choice == '4': + print(num1, "/", num2, "=", devide(num1, num2)) + +elif choice == '5': + print(num1, "//", num2, "=", devide_int(num1, num2)) + +elif choice == '6': + print(num1, "**0.5", "=", sqrt(num1)) + print(num2, "**0.5", "=", sqrt(num2)) + +else: + print("Error") \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_Flowey/QQ\346\210\252\345\233\27620201216231826.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_Flowey/QQ\346\210\252\345\233\27620201216231826.png" new file mode 100644 index 0000000000000000000000000000000000000000..4fdda30e57b53c3f4426851f014be3d8d70bef66 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_Flowey/QQ\346\210\252\345\233\27620201216231826.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_Flowey/QQ\346\210\252\345\233\27620201218131238.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_Flowey/QQ\346\210\252\345\233\27620201218131238.png" new file mode 100644 index 0000000000000000000000000000000000000000..c53ec35571b407133d446e125b4ec168f56b4ba7 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_Flowey/QQ\346\210\252\345\233\27620201218131238.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \344\270\212\344\274\240\344\273\243\347\240\201\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\2761.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \344\270\212\344\274\240\344\273\243\347\240\201\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\2761.png" new file mode 100644 index 0000000000000000000000000000000000000000..b16d10022c977f5f0a6be0d79e3489f3e30b6e1b Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \344\270\212\344\274\240\344\273\243\347\240\201\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\2761.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \344\270\212\344\274\240\344\273\243\347\240\201\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\2762.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \344\270\212\344\274\240\344\273\243\347\240\201\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\2762.png" new file mode 100644 index 0000000000000000000000000000000000000000..7d4cf1684efba22a04a5827c80256359e130034e Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \344\270\212\344\274\240\344\273\243\347\240\201\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\2762.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \345\273\272\347\253\213git\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\276.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \345\273\272\347\253\213git\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\276.png" new file mode 100644 index 0000000000000000000000000000000000000000..322d17d18c8bc8643ce5533e65f9f04ca70b88eb Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \345\273\272\347\253\213git\350\277\234\347\250\213\344\273\223\345\272\223\346\210\252\345\233\276.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \345\273\272\347\253\213venv\350\231\232\346\213\237\347\216\257\345\242\203\346\210\252\345\233\276.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \345\273\272\347\253\213venv\350\231\232\346\213\237\347\216\257\345\242\203\346\210\252\345\233\276.png" new file mode 100644 index 0000000000000000000000000000000000000000..1e77f5c03f835ccabbf55119509b57451b0e747d Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-2 \345\273\272\347\253\213venv\350\231\232\346\213\237\347\216\257\345\242\203\346\210\252\345\233\276.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-3 \351\227\256\351\242\2301&2.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-3 \351\227\256\351\242\2301&2.png" new file mode 100644 index 0000000000000000000000000000000000000000..efc555cf2c30d59c98cad2fab6ad2aa314341f8d Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/1-3 \351\227\256\351\242\2301&2.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/week 1-3.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/week 1-3.py" new file mode 100644 index 0000000000000000000000000000000000000000..b6f8ade05f6525e8c2ff3edb516c3e471925dc1f --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/week 1-3.py" @@ -0,0 +1,22 @@ +print(type(1)) +print(type(1.5)) +print(type("hello world")) +print(type(True)) +print(type(b"1")) +print(None) + +#list +a = [1,1.5,"hello world",True,b"1",None] +print(a) + +#tuple +a = (1,1.5,"hello world",True,b"1",None) +print(a) + +#dict 不能输出None +a = {1,1.5,"hello world",True,b"1",None} +print(a) + +#set +a = {"a":1,"b":1.5,"c":"hello world","d":True,"e":b"1","f":None} +print(a) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/week 2-1.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/week 2-1.py" new file mode 100644 index 0000000000000000000000000000000000000000..95d7f1f44bcf01c842ca1c19a67790dc8d5ba2f7 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/week 2-1.py" @@ -0,0 +1,39 @@ +#add +def add(a,b): + return a+b +print(add(1,2)) + +#less +def less(a,b): + return a-b +print(less(1,2)) + +#mult +def mult(a,b): + return a*b +print(mult(1,2)) + +#exce +def exce(a,b): + return a/b +print(exce(1,2)) + +#divi +def divi(a,b): + return a//b +print(divi(10,2)) + +#rema +def rema(a,b): + return a%b +print(rema(1,2)) + +#power +def power(a,b): + return a**b +print(power(1,2)) + +#sqrt +def sqrt(a,b): + return a**(1/b) +print(sqrt(1,2)) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\344\275\231\344\275\231\344\275\231/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232/.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/3\347\217\255/3\347\217\255_\345\223\262/push\346\210\220\345\212\237.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/push\346\210\220\345\212\237.png" new file mode 100644 index 0000000000000000000000000000000000000000..ea021c160abf5e09d57ea62f8ebe3cde9214c534 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/push\346\210\220\345\212\237.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/python\347\216\257\345\242\203\345\217\230\351\207\217.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/python\347\216\257\345\242\203\345\217\230\351\207\217.png" new file mode 100644 index 0000000000000000000000000000000000000000..1112642e58afbc35aa7b47f18c83c3f7531f3f94 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/python\347\216\257\345\242\203\345\217\230\351\207\217.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/python\347\250\213\345\272\217\350\277\220\350\241\214.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/python\347\250\213\345\272\217\350\277\220\350\241\214.png" new file mode 100644 index 0000000000000000000000000000000000000000..6c2e8bac041ca84b6fb09a41fed376771c152290 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/python\347\250\213\345\272\217\350\277\220\350\241\214.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/\350\277\234\347\250\213\344\273\223\345\272\223.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/\350\277\234\347\250\213\344\273\223\345\272\223.png" new file mode 100644 index 0000000000000000000000000000000000000000..123a8558d75a2991f8f8b129347b94db7b023891 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\223\262/\350\277\234\347\250\213\344\273\223\345\272\223.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\345\276\256\344\277\241\345\233\276\347\211\207_20201216175101.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\345\276\256\344\277\241\345\233\276\347\211\207_20201216175101.png" deleted file mode 100644 index ba185ee9a816a596f13d41dd5e41f1100ad5d18b..0000000000000000000000000000000000000000 Binary files "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\345\276\256\344\277\241\345\233\276\347\211\207_20201216175101.png" and /dev/null differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202/.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/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.png" new file mode 100644 index 0000000000000000000000000000000000000000..14d875d0c013fecdc9b28bf7bd5a9662c71c2e2a Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202/.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/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202/git\344\273\223\345\272\223\345\271\266\346\217\220\344\272\244\347\240\201\344\272\221.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202/git\344\273\223\345\272\223\345\271\266\346\217\220\344\272\244\347\240\201\344\272\221.png" new file mode 100644 index 0000000000000000000000000000000000000000..704046781cd5d90ff1ee51a1cc98f9445ae72052 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202/git\344\273\223\345\272\223\345\271\266\346\217\220\344\272\244\347\240\201\344\272\221.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203+\346\226\260\345\273\272\351\241\271\347\233\256.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203+\346\226\260\345\273\272\351\241\271\347\233\256.png" new file mode 100644 index 0000000000000000000000000000000000000000..9ff8f82490f2df72535b7b81bbe9dff339cf43f2 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202/\350\231\232\346\213\237\347\216\257\345\242\203+\346\226\260\345\273\272\351\241\271\347\233\256.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\272\214\345\221\250/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\272\214\345\221\250/.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/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/.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/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/my_caculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/my_caculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..38db2034fa20c70c59aba774a4bf4d67a975654b --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\345\237\271\345\230\211/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/my_caculator.py" @@ -0,0 +1,29 @@ +def add(a,b): + result = a + b + return (result) +def minus(a,b): + result = a - b + return(result) +def times(a,b): + result = a * b + return(result) +def divide(a,b): + result = a / b + return(result) +def exactdivide(a,b): + result = a // b + return(result) +def reminder(a,b): + result = a % b + return(result) +def sqrt(a): + result = a ** 2 + return(result) +a = 8 +b = 3 +print (add(a,b)) +print (minus(a,b)) +print (divide(a,b)) +print (exactdivide(a,b)) +print (reminder(a,b)) +print (sqrt(a)) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\346\235\216\346\263\212/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\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/3\347\217\255/3\347\217\255_\346\235\216\346\263\212/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.py" new file mode 100644 index 0000000000000000000000000000000000000000..d6a2dc34fcee9378df2aac7e4ed7144a89fe8907 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\346\235\216\346\263\212/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.py" @@ -0,0 +1,90 @@ +## 第一周-第三节作业 课后作业 +##- 四大基本数据结构中哪些是可变的, 哪些是不可变的? +##- 四大基本数据结构中哪些是有序的, 哪些是无序的? +##- 创建`set`, `list`, `dict`, `tuple`实例, 每个数据结构的实例需要包括六大基本类型. + + +##- 四大基本数据结构中哪些是可变的, 哪些是不可变的? + ## 可变的 list set + ## 不可变的 tuple dict + +##- 四大基本数据结构中哪些是有序的, 哪些是无序的? + ##有序的 list tuple + ##无序的 dict set + +##- 创建`set`, `list`, `dict`, `tuple`实例, 每个数据结构的实例需要包括六大基本类型. +## 基本数据类型 +# - `int` (整数) +# - `float`(浮点数) +# - `string`(字符串, 字符序列) +# - 转义字符 +# - `boolean`(布尔值) +# - `bytes`(二进制序列) +###################list############################## +print("-------------------list----------------------------") +print(list([1,2,3,4])) ## int + +print(list([float(1.2),float(2.2)])) # float + +print(list('hello,world')) #string + +print(list("2\\n")) #转义字符 + +print(list([bool(2),bool(2.2),bool(0)])) #boolean + +print(list(bytes(4))) #bytes +print("-------------------list----------------------------") + +###################list############################## + +print("-------------------tuple----------------------------") +###################tuple############################## +print(tuple([1,2,3,4])) ## int + +print(tuple([float(1.2),float(2.2)])) # float + +print(tuple('hello,world')) #string + +print(tuple("2\\n")) #转义字符 + +print(tuple([bool(2),bool(2.2),bool(0)])) #boolean + +print(tuple(bytes(4))) #bytes + +print("-------------------tuple----------------------------") + + +###################tuple############################## + +print("-------------------dict----------------------------") +###################dict############################## +print(dict(a=1,b=2)) ## int + +print(dict(a=1.2,b=2.2) ) # float + +print(dict(a='hello,world')) #string + +print(dict(a="2\\n")) #转义字符 + +print(dict(a=bool(2),b=bool(2.2),c=bool(0))) #boolean + +print(dict(a=bytes(4))) #bytes +print("-------------------dict----------------------------") + +###################dict############################## + +###################set############################## +print("-------------------set----------------------------") +print(set({1,2,3,4,5})) ## int + +print(set([float(1.2),float(2.2)])) # float + +print(set('hello,world')) #string + +print(set("2\n")) #转义字符 + +print(set([bool(2),bool(2.2),bool(0)])) #boolean + +print(set(bytes(4))) #bytes +print("-------------------set----------------------------") +###################set############################## \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\346\235\216\346\263\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\346\235\216\346\263\212/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202" 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/3\347\217\255/3\347\217\255_\346\235\216\346\263\212/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202\350\257\276.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\346\235\216\346\263\212/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202\350\257\276.py" new file mode 100644 index 0000000000000000000000000000000000000000..6b660bee5a6a0933720c165b5c020d08f4dca643 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\346\235\216\346\263\212/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202\350\257\276.py" @@ -0,0 +1,65 @@ +## 课后作业 +#- `+` 加法 +# `-` 减法 +#- `*` 乘法 +## - ` / ` 除法 +## - ` // ` 整除 +#- ` % ` 取余数 +## - ` ** ` x的y次幂 +# - 开方(没有提供直接的运算符) x ** (1 / 2) +#- abs() 取绝对值 + + +#- 用函数实现一个具有加, 减, 乘, 除, 整除, 取余, 开方的计算器 + ##my_calculator.py + + ## def add(a, b): + ## ... + ##def sqrt(a, b): + +# 加法 +def add(a,b): + return a+b; +print("-------------------加法----------------->a+b=",add(2,3)) + +# 减法 +def jian(a,b): + return a-b; +print("-------------------减法----------------->a-b=",jian(3,2)) + +# 乘法 +def cheng(a,b): + return a*b; +print("-------------------乘法-----------------a*b=>",cheng(2,3)) + +# 除法 +def chu(a,b): + return a/b; +print("-------------------除法-----------------a/b=>",chu(2,3)) + +# 整除 +def zhengchu(a,b): + return a//b; +print("-------------------整除-----------------a//b=>",zhengchu(3,2)) + +#取余数 +def quyushu(a,b): + return a%b; +print("-------------------取余数-----------------a%b=>",quyushu(3,2)) + +#x的y次幂 +def ycimi(a,b): + return a**b; +print("-------------------x的y次幂-----------------x**y=>",ycimi(2,3)) + + +# 开方(没有提供直接的运算符) x ** (1 / 2) +def kaifang(a): + return a**(1/2); +print("-------------------x的y次幂-----------------x**(1/2)=>",kaifang(4)) + + +#- abs() 取绝对值 +def qujueduizhi(a): + return abs(a); +print("-------------------abs(a)----------------abs(a)=>",qujueduizhi(-4)) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/.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/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/.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/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/876d2dbde1c1edc7ba4b56ecfd6dd26.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/L101.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/876d2dbde1c1edc7ba4b56ecfd6dd26.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/L101.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/bd57b594d553e67dc8cdeadd46ace32.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/L102.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/bd57b594d553e67dc8cdeadd46ace32.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/L102.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\345\205\213\351\232\206_\350\231\232\346\213\237\347\216\257\345\242\203.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\345\205\213\351\232\206_\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..fa4b4d0ef8f0d39a84e636314f2dc2360ee6ced9 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\345\205\213\351\232\206_\350\231\232\346\213\237\347\216\257\345\242\203.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\350\277\234\347\250\213\344\273\223\345\272\223.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\350\277\234\347\250\213\344\273\223\345\272\223.png" new file mode 100644 index 0000000000000000000000000000000000000000..aae048d8f55cc5d96b6ac9c9a668b375ed2b7b24 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\350\277\234\347\250\213\344\273\223\345\272\223.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\350\277\234\347\250\213\344\273\223\345\272\22302.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\350\277\234\347\250\213\344\273\223\345\272\22302.png" new file mode 100644 index 0000000000000000000000000000000000000000..e4b8c6680e7d74238505306728de3b75d8e34c16 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/images/\350\277\234\347\250\213\344\273\223\345\272\22302.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/main.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/main.py" new file mode 100644 index 0000000000000000000000000000000000000000..898726ca0c1f2cdb42334a0a79bce5fcaf6b1e4e --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/main.py" @@ -0,0 +1,16 @@ +# int, float, string, boolean, bytes, None +# list +l = [1, 1.1, 'abc', bool(1), bytes('abc'.encode("utf-8")), None] +print(l) + +# tuple +t = (2, 2.2, 'def', bool(0), bytes('def'.encode("utf-8")), None) +print(t) + +# dict +d = {'a': 3, 'b': 3.3, 'c': 'hello', 'd': bool(3), 'e': bytes('hello'.encode("utf-8")), 'f': None} +print(d) + +# set +s = {4, 4.4, 'world', bool(4), bytes('world'.encode("utf-8")), None} +print(s) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\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.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\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.md" new file mode 100644 index 0000000000000000000000000000000000000000..04a5fc22f99a5a201cf121faaa9b29c66505bca9 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\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.md" @@ -0,0 +1,6 @@ +# 第一周-第一节-作业提交 + +![image](./images/L101.png) + +![image](./images/L102.png) + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244.md" new file mode 100644 index 0000000000000000000000000000000000000000..1052efdd9a6ed2be176faae1f348f27b56b58211 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244.md" @@ -0,0 +1,36 @@ +# 第一周-第三节-作业提交 + +- #### 四大基本数据结构中哪些是可变的, 哪些是不可变的? + + 可变的:`list`,`dict`,`set` + + 不可变:`tuple` + +- #### 四大基本数据结构中哪些是有序的, 哪些是无序的? + + 有序的:`list`,`tuple` + + 无序的:`dict`,`set` + +- #### 创建`set`, `list`, `dict`, `tuple`实例, 每个数据结构的实例需要包括六大基本类型. + + ``` + # int, float, string, boolean, bytes, None + # list + l = [1, 1.1, 'abc', bool(1), bytes('abc'.encode("utf-8")), None] + print(l) + + # tuple + t = (2, 2.2, 'def', bool(0), bytes('def'.encode("utf-8")), None) + print(t) + + # dict + d = {'a': 3, 'b': 3.3, 'c': 'hello', 'd': bool(3), 'e': bytes('hello'.encode("utf-8")), 'f': None} + print(d) + + # set + s = {4, 4.4, 'world', bool(4), bytes('world'.encode("utf-8")), None} + print(s) + ``` + + \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244.md" new file mode 100644 index 0000000000000000000000000000000000000000..031fc346c289586a827490aea1c15b2bab113427 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week1/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\344\275\234\344\270\232\346\217\220\344\272\244.md" @@ -0,0 +1,11 @@ +# 第一周-第二节-作业提交 + +### 码云git仓库 + +![image](./images/远程仓库.png) + +![image](./images/远程仓库02.png) + +### pycharm虚拟环境 + +![image](./images/克隆_虚拟环境.png) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week2/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week2/.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/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week2/my_caculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week2/my_caculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..f25ba097305f466d32a97c79a53d79bd66a2b4b8 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\350\214\227\350\214\227\346\230\257\345\217\252\345\201\207\351\270\275\345\255\220/week2/my_caculator.py" @@ -0,0 +1,48 @@ +def add(a, b): + print(a, "+", b, "=") + return a + b + +def minus(a, b): + print(a, "-", b, "=") + return a - b + +def mul(a, b): + print(a, "*", b, "=") + return a * b + +def div(a, b): + print(a, "/", b, "=") + return a / b + +def be_div(a, b): + print(a, "//", b, "=") + return a // b + +def rem(a, b): + print(a, "%", b, "=") + return a % b + +def root(a): + print(a, "^1/2 =") + return a ** (1/2) + +a = int(input("请输入数字:")) +symbol = str(input("请输入要执行的操作:")) +if str(symbol) == "开方": + print(root(a)) +else: + b = int(input("请输入数字:")) + if str(symbol) == "+": + print(add(a, b)) + elif str(symbol) == "-": + print(minus(a, b)) + elif str(symbol) == "*": + print(mul(a, b)) + elif str(symbol) == "/": + print(div(a, b)) + elif str(symbol) == "//": + print(be_div(a, b)) + elif str(symbol) == "%": + print(rem(a, b)) + else: + print("无法进行该运算") \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/images/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/images/.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/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/images/\350\231\232\346\213\237\347\216\257\345\242\203.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/images/\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..8d4081b209eacb82aef32577f9c6cdc4abafcd47 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/images/\350\231\232\346\213\237\347\216\257\345\242\203.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/main.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/main.py" new file mode 100644 index 0000000000000000000000000000000000000000..db1952f99acfa9d2aab7706a9620784e22a14c9f --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/main.py" @@ -0,0 +1,44 @@ +# # 四大基本数据结构中哪些是可变的, 哪些是不可变的? +# +# 可变的:列表list,字典dict,集合set +# 不可以变的:元组tuple +# + +# 四大基本数据结构中哪些是有序的, 哪些是无序的? +# +# 有序的:list,tupe +# 无序的:dict,set +# +# 创建set, list, dict, tuple实例, 每个数据结构的实例需要包括六大基本类型. +# +# 六大基本类型:int,float,bytes,str,boolean,None +from encodings.utf_8 import encode + +print(type(7)) +print(type(2.0)) +print(type('3'.encode("utf-8"))) +print(type('str')) +a=bool(1) +print(a,type(a)) +print(type(None)) + +print("=====22========") +# 基本数据类型 +a=int(7) +b=float(2.0) +c=str('77') +d=bytes('python'.encode("utf-8")) +e=bool(0) +f=None +alist=[a,b,c,d,f] +atuple=(a,b,c,d,f) +adict={'1':a,'2':b,'3':c,'4':d,'5':f} +aset=set([a,b,c,d,e,f]) +print("列表alist:",alist) +print("元组atuple:",atuple) +print("字典adict:",adict) +print("集合aset:",aset) + + + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/my_calculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..f9da86937713fadf54aa5357535c719651f724d1 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/my_calculator.py" @@ -0,0 +1,57 @@ +''' +用函数实现一个具有加, 减, 乘, 除, 整除, 取余, 开方的计算器 + +my_calculator.py + +def add(a, b): + +def sqrt(a, b): + +''' +def add(a,b): + return a + b ; +def sub(a,b): + return a - b; +def mul(a,b): + return a * b; +def div(a,b): + if b != 0: + return a / b; + else: + return "除数不能为零!!!" +def rem(a,b): + return a // b; +def ediv(a,b): + return a % b; +def sqrt(a): + c = int(a) + if c>=0: + return c ** (1/2); + else: + return "开方数不能小于零?"; +c = input("请输入你的运算符号:‘+、-、*、/,//,%,开方:%%") +# input3 = input("请输入你要开方的数,如果不是进行开方运算请按回车键") + +if c == '%%': + a = float(input("请输入你要开方的数:")) + print(a,"^(1/2)","=",sqrt(a)) +else: + a = float(input("请输入你要运算的第一个数:")) + b = float(input("请输入你要运算的第二个数:")) + # c = input("请输入你的运算符号:‘+、-、*、/,//,%,开方:%%") + if c == '+': + print(a,"+",b,"=",add(a,b)) + elif c == '-': + print(a,"-",b,"=",sub(a,b)) + elif c == '*': + print(a,"*",b,"=",mul(a,b)) + elif c == '-': + print(a,"/",b,"=",div(a,b)) + elif c == '-': + print(a,"//",b,"=",ediv(a,b)) + elif c == '-': + print(a,"%",b,"=",rem(a,b)) + elif c == '-': + print(a,"^(1/2)",b,"=",sqrt(a,b)) + else : + print("请输入正确的运算?") diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\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/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..1d5fdd790ae5bc792b5e38d3c2c81b2609cf4425 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\200\206\345\205\211\345\271\264/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232.md" @@ -0,0 +1,6 @@ +1.新建仓库提交到码云 +https://gitee.com/nilive/git_test + +2.新建虚拟环境 + +![image-20201219204122421](https://gitee.com/nilive/git_test/raw/master/images/%E8%99%9A%E6%8B%9F%E7%8E%AF%E5%A2%83.png) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\270\200\345\221\250---\347\254\2542\350\212\202\350\257\276\344\275\234\344\270\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201219191856.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\270\200\345\221\250---\347\254\2542\350\212\202\350\257\276\344\275\234\344\270\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201219191856.png" new file mode 100644 index 0000000000000000000000000000000000000000..726887fbab45842520d026a9865f197e3e0ded87 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\270\200\345\221\250---\347\254\2542\350\212\202\350\257\276\344\275\234\344\270\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201219191856.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\270\200\345\221\250---\347\254\2542\350\212\202\350\257\276\344\275\234\344\270\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201219215922.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\270\200\345\221\250---\347\254\2542\350\212\202\350\257\276\344\275\234\344\270\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201219215922.png" new file mode 100644 index 0000000000000000000000000000000000000000..a0f9d094644b7a9559a05318ec69d82d19f840e3 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\270\200\345\221\250---\347\254\2542\350\212\202\350\257\276\344\275\234\344\270\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201219215922.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\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\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201217200303.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\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\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201217200303.png" new file mode 100644 index 0000000000000000000000000000000000000000..f084f0c4a75d06cf6f33a2aa7782acad8c8935df Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\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\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201217200303.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\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\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201217201028.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\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\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201217201028.png" new file mode 100644 index 0000000000000000000000000000000000000000..2bb0832fea6bd5c2b4519980e44222a6506f237b Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\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\232.md/\345\276\256\344\277\241\346\210\252\345\233\276_20201217201028.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\272\214\345\221\250---\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232.md/my_calculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\272\214\345\221\250---\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232.md/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..1050c5598dec4ac58f40470d06569d86b0087dff --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/3\347\217\255---\351\231\266\345\206\266---\347\254\254\344\272\214\345\221\250---\347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232.md/my_calculator.py" @@ -0,0 +1,39 @@ +def add(a, b): + return a + b +def sub(a, b): + return a - b +def mul(a, b): + return a * b +def div(a, b): + return a / b +def zc(a, b): + return a // b +def qy(a, b): + return a % b +def kf(a): + return a ** (1/2) +print("计算器") +choice = input ("输入运算选择:1,加法;2,减法;3,乘法;4,除法;5,整除;6,取余数;7,开方") +if choice == "1" : + tmp = input("请输入你要计算的数字:") + add(tmp) +elif choice == '2': + tmp = input("请输入你要计算的数字:") + sub(tmp) +elif choice == '3': + tmp = input("请输入你要计算的数字:") + mul(tmp) +elif choice == '4': + tmp = input("请输入你要计算的数字:") + div(tmp) +elif choice == '5': + tmp = input("请输入你要计算的数字:") + zc(tmp) +elif choice == '6': + tmp = input("请输入你要计算的数字:") + qy(tmp) +elif choice == '7': + tmp = input("请输入你要计算的数字:") + kf(tmp) +else: + print("你输入的有误,请重新输入") \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/zuoye1z-3j" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/zuoye1z-3j" new file mode 100644 index 0000000000000000000000000000000000000000..d5b9f651edf562eeef10e6a2a4598ae05b8c2ef0 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/zuoye1z-3j" @@ -0,0 +1,5 @@ +可变的数据结构有:list(列表),dict(字典),set(集合) +不可变的数据结构有:tuple(元组) + +有序的数据结构有:list(列表),tuple(元组) +无序的数据结构有:dict(字典),set(集合) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/\344\275\234\344\270\2321\345\221\250-3\350\212\202-2.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/\344\275\234\344\270\2321\345\221\250-3\350\212\202-2.py" new file mode 100644 index 0000000000000000000000000000000000000000..cc9913f63d0cb38bd05e4a4219decf7c6285d5fe --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/3\347\217\255/3\347\217\255_\351\231\266\345\206\266/\344\275\234\344\270\2321\345\221\250-3\350\212\202-2.py" @@ -0,0 +1,7 @@ +a = [1, 2.2, "列表", '7>9', b'yes', ] + +tuple =(3, 5.32, "yuanzu", 1 < 6, b'no', ) + +dict = {"a": 1, "b": 6.66, "c": 'wuyu', "d": 9 > 8, "e": b'ass', "f": ''} + +set = {9, 8.8, "shuchu", 9<9, b'none'} \ No newline at end of file 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_Drift/images/git_init.png" "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_Drift/images/git_init.png" new file mode 100644 index 0000000000000000000000000000000000000000..c1e3241cabeaa0c944017dc74500057671498228 Binary files /dev/null and "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_Drift/images/git_init.png" differ 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_Drift/images/virtual_environment.png" "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_Drift/images/virtual_environment.png" new file mode 100644 index 0000000000000000000000000000000000000000..8621eb36c4c4e7de2ce85ff287aaef3b45ec473b Binary files /dev/null and "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_Drift/images/virtual_environment.png" differ 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_Drift/\345\233\233\347\217\255_Drift_\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\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_Drift/\345\233\233\347\217\255_Drift_\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232.py" new file mode 100644 index 0000000000000000000000000000000000000000..f6fa462aba8d9693ed4a9a28879f3ba65adccde8 --- /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_Drift/\345\233\233\347\217\255_Drift_\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232.py" @@ -0,0 +1,40 @@ +# 四大基本数据结构 +# list(列表) +# 有序 可变 +# tuple(元组) +# 有序 不可变 +# dict(字典) +# 无序 可变 +# set(集合) +# 无序 可变 + +def datatest(): + # 整数 + int_t = 1 + # 浮点数 + float_t = 1.1 + # 字符串 + string_t = "string" + # 布尔 + boolean_t = True + # bytes + bytes_t = b'bytes' + # None + none_t = None + + # 列表 + list_t = [int_t, float_t, string_t, boolean_t, bytes_t, none_t] + # 元组 + tuple_t = (int_t, float_t, string_t, boolean_t, bytes_t, none_t) + # 字典 + dict_t = {"int_t" : int_t, "float_t" : float_t, "string_t" : string_t, "boolean_t" : boolean_t, "bytes_t" : bytes_t, "none_t" : none_t} + # 集合 + set_t = {int_t, float_t, string_t, boolean_t, bytes_t, none_t} + + print(list_t) + print(tuple_t) + print(dict_t) + print(set_t) + +# set值是唯一的,不存在重复的值,boolean类型True=0、False=1,所以当set集合中存在1或者0,就无法添加boolean值 +print(datatest()) \ No newline at end of file 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_Drift/\345\233\233\347\217\255_Drift_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\350\257\276\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/4\347\217\255/4\347\217\255_Drift/\345\233\233\347\217\255_Drift_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..240cb52117a3934a17c2b81b165df67de6b43996 --- /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_Drift/\345\233\233\347\217\255_Drift_\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232.md" @@ -0,0 +1,9 @@ +- git提交项目 + + ![git_init](https://gitee.com/fuwenlong/second-python-bootcamp/raw/master/%E7%AC%AC%E4%BA%8C%E6%9C%9F%E8%AE%AD%E7%BB%83%E8%90%A5/4%E7%8F%AD/4%E7%8F%AD_Drift/images/git_init.png) + + + +- 配置虚拟环境 + + ![virtual_environment](https://gitee.com/fuwenlong/second-python-bootcamp/raw/master/%E7%AC%AC%E4%BA%8C%E6%9C%9F%E8%AE%AD%E7%BB%83%E8%90%A5/4%E7%8F%AD/4%E7%8F%AD_Drift/images/virtual_environment.png) \ No newline at end of file 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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/.keep" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/.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/4\347\217\255/4\347\217\255_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\273\243\347\240\201.png" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\273\243\347\240\201.png" new file mode 100644 index 0000000000000000000000000000000000000000..64434a6719bcdbd3afeee5cadce8e5bba4904ad1 Binary files /dev/null and "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\273\243\347\240\201.png" differ 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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213.png" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213.png" new file mode 100644 index 0000000000000000000000000000000000000000..51de388fdcd34aadd09ea4fa060ca5385fbf6631 Binary files /dev/null and "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213.png" differ 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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213\346\226\271\346\263\225\350\241\250.png" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213\346\226\271\346\263\225\350\241\250.png" new file mode 100644 index 0000000000000000000000000000000000000000..fb326f0b8ebb86f12b73e3be4a7c66090535d42a Binary files /dev/null and "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\270\211\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213\346\226\271\346\263\225\350\241\250.png" differ 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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/.keep" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/.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/4\347\217\255/4\347\217\255_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_1\357\274\210\350\231\232\346\213\237\347\216\257\345\242\203\357\274\211.png" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_1\357\274\210\350\231\232\346\213\237\347\216\257\345\242\203\357\274\211.png" new file mode 100644 index 0000000000000000000000000000000000000000..9d92ee03cbb3122cf6673ea5d025bfb20820c8c8 Binary files /dev/null and "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_1\357\274\210\350\231\232\346\213\237\347\216\257\345\242\203\357\274\211.png" differ 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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_2\357\274\210\350\231\232\346\213\237\347\216\257\345\242\203\357\274\211.png" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_2\357\274\210\350\231\232\346\213\237\347\216\257\345\242\203\357\274\211.png" new file mode 100644 index 0000000000000000000000000000000000000000..1d1d624a0c97798f378b01642d32da7efb1b03bb Binary files /dev/null and "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_2\357\274\210\350\231\232\346\213\237\347\216\257\345\242\203\357\274\211.png" differ 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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_3\357\274\210git\345\220\214\346\255\245\357\274\211.png" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_3\357\274\210git\345\220\214\346\255\245\357\274\211.png" new file mode 100644 index 0000000000000000000000000000000000000000..01134b744be7535673d8756fb779c29d6271b7ec Binary files /dev/null and "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_3\357\274\210git\345\220\214\346\255\245\357\274\211.png" differ 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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_4\357\274\210git\345\220\214\346\255\245\357\274\211.png" "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_4\357\274\210git\345\220\214\346\255\245\357\274\211.png" new file mode 100644 index 0000000000000000000000000000000000000000..de3921540b2cd8f30eb59c167eca60af5260cf47 Binary files /dev/null and "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_LiPing/\347\254\254\344\270\200\345\221\250/\347\254\254\344\272\214\350\212\202\350\257\276/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_4\357\274\210git\345\220\214\346\255\245\357\274\211.png" differ 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_LiPing/\347\254\254\344\272\214\345\221\250/.keep" "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_LiPing/\347\254\254\344\272\214\345\221\250/.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/4\347\217\255/4\347\217\255_LiPing/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\350\257\276/.keep" "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_LiPing/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\350\257\276/.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/4\347\217\255/4\347\217\255_LiPing/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\350\257\276/my_calculator.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_LiPing/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\350\257\276/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..3607bb110e38574be31739dfbeac74bce529726f --- /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_LiPing/\347\254\254\344\272\214\345\221\250/\347\254\254\344\270\200\350\212\202\350\257\276/my_calculator.py" @@ -0,0 +1,57 @@ +from math import sqrt + +def add(a, b): + return a+b + +def sub(a, b): + return a-b + +def mul(a, b): + return a*b + +def div(a, b): + return a/b + +def exdiv(a, b): + return a//b + +def rem(a, b): + return a%b + +def pow(a, b): + return a**b + +if __name__ == "__main__": + print("请问要做什么运算:") + print("1:加法 2:减法 3:乘法 4:除法 5:整除 6:取余 7:乘方 8:开二次方 q:退出") + while 1: + print("输入运算方式:") + i = input() + if i =="q": + break + elif i=='1'or i=='2'or i=='3'or i=='4'or i=='5'or i=='6'or i=='7': + print("第一个数:") + a = float(input()) + print("第二个数:") + b = float(input()) + if i=='1': + print(str(a)+"+"+str(b)+"="+str(add(a, b))) + if i=='2': + print(str(a)+"-"+str(b)+"="+str(sub(a, b))) + if i=='3': + print(str(a)+"*"+str(b)+"="+str(mul(a, b))) + if i=='4': + print(str(a)+"/"+str(b)+"="+str(div(a, b))) + if i=='5': + print(str(a)+"//"+str(b)+"="+str(exdiv(a, b))) + if i=='6': + print(str(a)+"%"+str(b)+"="+str(rem(a, b))) + if i=='7': + print(str(a)+"**"+str(b)+"="+str(pow(a, b))) + elif i=='8': + print("输入数字:") + a = int(input()) + print(sqrt(a)) + else: + print("请输入正确的指令!") + 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_\345\221\250\345\262\261/Pycharm\350\231\232\346\213\237\347\216\257\345\242\203.png" "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_\345\221\250\345\262\261/Pycharm\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..fd56ea458b8028f0144e83888f43f755f378b7ff Binary files /dev/null and "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_\345\221\250\345\262\261/Pycharm\350\231\232\346\213\237\347\216\257\345\242\203.png" differ 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_\345\221\250\345\262\261/WX20201220-114308@2x.png" "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_\345\221\250\345\262\261/WX20201220-114308@2x.png" new file mode 100644 index 0000000000000000000000000000000000000000..3a29ae0e4e931d21f6203305a675128480400911 Binary files /dev/null and "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_\345\221\250\345\262\261/WX20201220-114308@2x.png" differ 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_\345\221\250\345\262\261/dict.png" "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_\345\221\250\345\262\261/dict.png" new file mode 100644 index 0000000000000000000000000000000000000000..be6e2530aebf4a272be3c66a67663e75867a053a Binary files /dev/null and "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_\345\221\250\345\262\261/dict.png" differ 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_\345\221\250\345\262\261/list.png" "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_\345\221\250\345\262\261/list.png" new file mode 100644 index 0000000000000000000000000000000000000000..4d8e48c23e6eb60f6a60223892262783d5bdb1bb Binary files /dev/null and "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_\345\221\250\345\262\261/list.png" differ 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_\345\221\250\345\262\261/set.png" "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_\345\221\250\345\262\261/set.png" new file mode 100644 index 0000000000000000000000000000000000000000..0ae62050218f5c5709a9d3df17a9bb3a63b6203b Binary files /dev/null and "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_\345\221\250\345\262\261/set.png" differ 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_\345\221\250\345\262\261/tuple.png" "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_\345\221\250\345\262\261/tuple.png" new file mode 100644 index 0000000000000000000000000000000000000000..bfcb51050a2bc8f4afc4bac3a0ad24c2442fe547 Binary files /dev/null and "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_\345\221\250\345\262\261/tuple.png" differ 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_\345\221\250\345\262\261/\345\220\214\346\255\245\345\210\260gitee.png" "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_\345\221\250\345\262\261/\345\220\214\346\255\245\345\210\260gitee.png" new file mode 100644 index 0000000000000000000000000000000000000000..1e675593cba0494f6c73fd1f2554b84e2f968220 Binary files /dev/null and "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_\345\221\250\345\262\261/\345\220\214\346\255\245\345\210\260gitee.png" differ 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_\345\221\250\345\262\261/\346\234\254\345\234\260\344\273\243\347\240\201.png" "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_\345\221\250\345\262\261/\346\234\254\345\234\260\344\273\243\347\240\201.png" new file mode 100644 index 0000000000000000000000000000000000000000..3f4c1d7fc9b7a1f40bc2a8e26401ed437302d4c2 Binary files /dev/null and "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_\345\221\250\345\262\261/\346\234\254\345\234\260\344\273\243\347\240\201.png" differ 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_\345\256\211\351\200\270/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202" "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_\345\256\211\351\200\270/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202" new file mode 100644 index 0000000000000000000000000000000000000000..e07b6384f015581516dee8b3cdd1373252dc509b --- /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_\345\256\211\351\200\270/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202" @@ -0,0 +1,7 @@ +问题一:list、dict、set可变,tuple不可变 +问题二:list、tuple有序,dict、set无序 +问题三: +[1, 1.0, 'a', True, b'str', None] +(1, 1.0, 'a', True, b'str', None) +{1:1, 1.0:1, 'a':1, True:1, b'str':1, None:1} +{1, 1.0, 'a', True, b'str', None} \ No newline at end of file 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_\345\256\211\351\200\270/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.png" "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_\345\256\211\351\200\270/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.png" new file mode 100644 index 0000000000000000000000000000000000000000..d020ca57421483c5cebae42532c71f4b8da58cb4 Binary files /dev/null and "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_\345\256\211\351\200\270/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202.png" differ 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_\345\256\211\351\200\270/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202" "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_\345\256\211\351\200\270/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202" new file mode 100644 index 0000000000000000000000000000000000000000..5cf41ae76ac21ff61e030e0ea6dc42601f2890a8 --- /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_\345\256\211\351\200\270/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202" @@ -0,0 +1,34 @@ +#!/usr/bin/python3 + +def add(a, b): + return a + b + +def less(a, b): + return a - b + +def mult(a, b): + return a * b + +def exce(a, b): + return a / b + +def divi(a, b): + return a // b + +def rema(a, b): + return a % b + +def power(a, b): + return a ** b + +def sqrt(a, b): + return a ** (1/b) + +print(add(10,2)) +print(less(10,2)) +print(mult(10,2)) +print(exce(10,2)) +print(divi(11,2)) +print(rema(11,2)) +print(power(10,2)) +print(sqrt(9,2)) \ No newline at end of file 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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-test.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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-test.py" new file mode 100644 index 0000000000000000000000000000000000000000..0ebca7acacbe0dfb343b0ad748cb7b3e1b20f381 --- /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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-test.py" @@ -0,0 +1,21 @@ +''' +六大基本数据类型:int,float,str,bytes,boolean,None +四大基本数据结构:list,tuple,dict,set +''' +a=int(1) +b=float(2.0) +c=str('3') +d=bytes('4'.encode('utf-8')) +e=bool(5) +f=None + +#print(a,'\n',b,'\n',c,'\n',d,'\n',e,'\n',f,type(f)) +aa=[a,b,c,d,e,f] +bb=(a,b,c,d,e,f) +cc={"a1": a,"b1":b,"c1":c,"d1":d,"e1":e,"f1":f} +dd=set([a,b,c,d,e,f]) + +print('列表aa:',aa) +print('元组bb:',bb) +print('字典cc:',cc) +print('集合dd:',dd) \ No newline at end of file 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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\345\233\233\345\244\247\345\237\272\346\234\254\346\225\260\346\215\256\347\273\223\346\236\204\345\267\256\345\274\202.md" "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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\345\233\233\345\244\247\345\237\272\346\234\254\346\225\260\346\215\256\347\273\223\346\236\204\345\267\256\345\274\202.md" new file mode 100644 index 0000000000000000000000000000000000000000..8b08dfbd2d2bbec24b26c74b9d78d42416ecfbce --- /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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\345\233\233\345\244\247\345\237\272\346\234\254\346\225\260\346\215\256\347\273\223\346\236\204\345\267\256\345\274\202.md" @@ -0,0 +1,13 @@ +1:四大基本数据结构中哪些是可变的, 哪些是不可变的? + +​ 可变的:列表list,字典dict,集合set + +​ 不可以变的:元组tuple + +2:四大基本数据结构中哪些是有序的, 哪些是无序的? + +​ 有序的:列表list,元组tuple + +​ 无序的:字典dict,集合set + +3:set无法包括全部数据类型(bool值为true时) \ No newline at end of file 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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-git\346\217\220\344\272\244\351\241\271\347\233\256\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223.png" "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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-git\346\217\220\344\272\244\351\241\271\347\233\256\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223.png" new file mode 100644 index 0000000000000000000000000000000000000000..7efcb20e9d6d9e6bdaae5671055d3b82b181942c Binary files /dev/null and "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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-git\346\217\220\344\272\244\351\241\271\347\233\256\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223.png" differ 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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-pycharm\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" "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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-pycharm\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..1f7611d05fbc88ed23582a5af9c9c4da7db01785 Binary files /dev/null and "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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-pycharm\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" differ 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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\346\277\200\346\264\273\350\231\232\346\213\237\347\216\257\345\242\203.png" "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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\346\277\200\346\264\273\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..9e49c7cf5ed7462da29c91431adcd2e2037f3342 Binary files /dev/null and "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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\346\277\200\346\264\273\350\231\232\346\213\237\347\216\257\345\242\203.png" differ 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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\272\214\345\221\250/.keep" "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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\272\214\345\221\250/.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/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\272\214\345\221\250/my_calculator.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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\272\214\345\221\250/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..784ef6b09b4e7e2e6003033f720bbdd4f28e1c53 --- /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\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\344\272\214\345\221\250/my_calculator.py" @@ -0,0 +1,41 @@ +def add(a,b): + return int(a)+int(b) +def subtract(a,b): + return int(a)-int(b) +def multiply(a,b): + return int(a)*int(b) +def divide(a,b): + return int(a)/int(b) +def zhengchu(a,b): + return int(a)//int(b) +def quyu(a,b): + return int(a)%int(b) +def sqrt(a,b): + return int(a)**(1/int(b)) + +a=input("请输入第一个数字:") +b=input("请输入运算符(根号用空格表示):") +c=input("请输入第二个数字:") + +if b=='+': + result=add(a,c) + print("运算结果为:",result) +if b=='-': + result=subtract(a,c) + print("运算结果为:",result) +if b=='*': + result=multiply(a,c) + print("运算结果为:",result) +if b=='/': + result=divide(a,c) + print("运算结果为:",result) +if b=='//': + result=zhengchu(a,c) + print("运算结果为:",result) +if b=='%': + result=quyu(a,c) + print("运算结果为:",result) +if b==' ': + #'根号打不出来用空格表示' + result=sqrt(a,c) + print("运算结果为:",result) \ No newline at end of file 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\270\200\345\221\250-\347\254\2542\350\212\202\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/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\270\200\345\221\250-\347\254\2542\350\212\202\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..e52df6543ba1be750b5235928b1d297cc203cedb --- /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\270\200\345\221\250-\347\254\2542\350\212\202\344\275\234\344\270\232.md" @@ -0,0 +1,15 @@ +4班-武明-第一周-第二节作业 + +课后作业 + +- 新建一个项目, 建立虚拟环境,在pycharm中配置虚拟环境 + +![ScreenClip](http://typorabypicgo.zhanghm.cc/ScreenClip.png) + + + +- 建立git仓库,并同步到码云: + + + + ![ScreenCladip](http://typorabypicgo.zhanghm.cc/ScreenCladip.png) \ No newline at end of file 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\270\200\345\221\250-\347\254\2543\346\254\241\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\270\200\345\221\250-\347\254\2543\346\254\241\344\275\234\344\270\232.py" new file mode 100644 index 0000000000000000000000000000000000000000..25748f37c623ec67dab873cdd572f47e58ce812c --- /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\270\200\345\221\250-\347\254\2543\346\254\241\344\275\234\344\270\232.py" @@ -0,0 +1,44 @@ +""" +4班-武明 -第一周-第3次作业提交 +项目 是否可变 是否有序 +列表 可变 有序 +元组 不可变 有序 +字典 可变 无序 +集合 可变 无序 + +""" +# 创建包含6种数据类型的列表 +n = 5 # 整数 +f = 2.8 #浮点数 +s = "chuanchuan" # 字符串 +t = True #布尔值 +no = None # 空值 +b = bytes("hi".encode("utf-8")) # bytes类型 + +# 创建列表list1 +list1 = [n,f,s,t,no,b] + +print("list1 = ",list1,"\nlist1的类型为:",type(list1)) + +print("----------------------------分割线------------------------------------") +# 创建元组tuple1 +tuple1 = (n,f,s,t,no,b) + +print("tuple1 = ",tuple1,"\ntuple1的类型为:",type(tuple1)) + +print("----------------------------分割线------------------------------------") + +# 创建集合set1 +set1 = {n,f,s,t,t,no,b} # 包含所有六种类型 + +print("set1 = ",set1,"\nset1的类型为:",type(set1)) + +print("----------------------------分割线------------------------------------") + +# 创建字典dict +dict1 = {n:2,f:9,s:8,t:5,no:12,b:15} + +print("dict1 = ",dict1,"\ndict1的类型为:",type(dict1), + "\n\n其中n的类型为:",type(5),"\nf的类型为:",type(2.8), + "\ns的类型为:",type(s),"\nt的类型为:",type(t), + "\nno的类型为:",type(no),"\nb的类型为:",type(b)) \ No newline at end of file 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/\347\254\254\344\270\200\345\221\250_\347\254\2541\350\212\202_\344\275\234\344\270\232\346\217\220\344\272\244.md" "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\270\200\345\221\250_\347\254\2541\350\212\202_\344\275\234\344\270\232.md" similarity index 100% rename from "\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/\347\254\254\344\270\200\345\221\250_\347\254\2541\350\212\202_\344\275\234\344\270\232\346\217\220\344\272\244.md" rename to "\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\270\200\345\221\250_\347\254\2541\350\212\202_\344\275\234\344\270\232.md" 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 0000000000000000000000000000000000000000..ac82c8c5c102578de3a03199c45a72acf3b09512 --- /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 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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/Hello_word/hello_world.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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/Hello_word/hello_world.py" new file mode 100644 index 0000000000000000000000000000000000000000..671cb172bcbd5267ce4a7df10094197da4f840c5 --- /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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/Hello_word/hello_world.py" @@ -0,0 +1 @@ +print("你好,我修改了世界!") \ No newline at end of file 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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2542\350\212\202\350\257\276.md" "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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2542\350\212\202\350\257\276.md" index 4a9887370215e9e0be730ef87429ead15a7f6796..b8feeaf49500faaa302ba5b62c4fa55a5d2e1de8 100644 --- "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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2542\350\212\202\350\257\276.md" +++ "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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2542\350\212\202\350\257\276.md" @@ -1,13 +1,22 @@ -## 课后作业 - -- 四大基本数据结构中哪些是可变的,哪些是不可变的? - - 元组不可变,列表、字典、集合可变 - -- 四大基本数据结构中哪些是有序的,哪些是无序的? - - 列表元组有序、字典集合无序 - -- 创建set,list,dict,tuple结构,每个数据结构需要包括六大基本类型(实操题) - -详见[第一周_第二节.py文件](https://gitee.com/wlzx059/second-python-bootcamp/blob/master/%E7%AC%AC%E4%BA%8C%E6%9C%9F%E8%AE%AD%E7%BB%83%E8%90%A5/4%E7%8F%AD/4%E7%8F%AD_%E6%AF%8F%E6%97%A5%E5%85%85%E7%94%B5/%E7%AC%AC%E4%B8%80%E5%91%A8_%E7%AC%AC%E4%BA%8C%E8%8A%82%E8%AF%BE.py) \ No newline at end of file +## 课后作业 +- 新建一个项目, 建立虚拟环境, 在Pycharm配置虚拟环境. +- 建立git仓库, 并同步到码云. + +### 操作过程记录 +- 把代码仓库从gitee上面clone一份下来 + ``` + git clone https://gitee.com/wlzx059/second-python-bootcamp.git + ``` +- 初始化git + ``` + git init + ``` +- 第一次要配置用户名跟邮箱 +- 配置远程仓库(远程代码仓库) + ``` + git remote add origin https://gitee.com/wlzx059/second-python-bootcamp.git + ``` +- 新建`.gitignore`文件,只提交自己的作业文件,把其他的都屏蔽掉 +- 修改自己的作业文件 +- 提交到本地仓库commit +- 提交到远程仓库push 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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2543\350\212\202\350\257\276.md" "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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2543\350\212\202\350\257\276.md" new file mode 100644 index 0000000000000000000000000000000000000000..fe397e4eb7f40d423d1ec105f2127365a9600424 --- /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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2543\350\212\202\350\257\276.md" @@ -0,0 +1,19 @@ +## 课后作业 + +- 四大基本数据结构中哪些是可变的,哪些是不可变的? +- 四大基本数据结构中哪些是有序的,哪些是无序的? +- 创建`set`, `list`,` dict`,` tuple`实例,每个数据结构的实例需要包括六大基本类型 + + +## 答案 + +#### 四大基本数据结构中哪些是可变的,哪些是不可变的? + +list是可变的,turple是不可变的,dict是可变的,set是可变的 + +#### 四大基本数据结构中哪些是有序的,哪些是无序的? + +list是有序的,turple是有序的,字典是无序的,集合是无序的 + +#### 创建`set`, `list`,` dict`,` tuple`实例,每个数据结构的实例需要包括六大基本类型 +详见第一周_第3节课.py \ No newline at end of file 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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2541\350\212\202\350\257\276.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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2543\350\212\202\350\257\276.py" similarity index 54% rename from "\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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2541\350\212\202\350\257\276.py" rename to "\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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2543\350\212\202\350\257\276.py" index 96cecbf6aeb86ad0f14caa50f1da94885b2e7633..e3715642847d8f5f397ba890afbaec77d7656514 100644 --- "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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2541\350\212\202\350\257\276.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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250_\347\254\2543\350\212\202\350\257\276.py" @@ -1,11 +1,15 @@ -""" -第二节课作业 -""" -list_example = [1, 1.0, '1', True, None, b'1'] -tuple_example = (1, 1.0, '1', True, None, b'1') -dict_example = {'a': 1, 'b': 1.0, 'c': '1', 'd': True, 'e': None, 'f': b'1'} -set_example = {1, 1.0, '1', True, None, b'1'} -print(type(list_example)) -print(type(tuple_example)) -print(type(dict_example)) -print(type(set_example)) \ No newline at end of file +""" +第二节课作业 +六大数据基本类型 +int,float,字符串,boolean,None,二进制序列bytes +集合没有包括boolean +""" +list_example = [1, 1.0, '1', True, None, b'1'] +tuple_example = (1, 1.0, '1', True, None, b'1') +dict_example = {'a': 1, 'b': 1.0, 'c': '1', 'd': True, 'e': None, 'f': b'1'} +set_example = {1, 1.0, '1', None, b'1'} +print(type(list_example)) +print(type(tuple_example)) +print(type(dict_example)) +print(type(set_example)) +print(list_example, tuple_example, dict_example, set_example) 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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232/my_calculator.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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..866a14334df0d39cd82979d6bf4c8255b635c615 --- /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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232/my_calculator.py" @@ -0,0 +1,63 @@ +""" + +每日充电的初级计算器 +add:加 sub:减 mul:乘 div:除 remainder:取余 squ:开方 aliquot:取整 + +""" + + +# 加 +def add(a, b): + return a + b + + +# 减 +def sub(a, b): + return a - b + + +# 乘 +def mul(a, b): + return a * b + + +# 除 +def div(a, b): + return a / b + + +# 取余 +def remainder(a, b): + return a % b + + +# 开方 +def squ(a, b): + return a ** (1 / b) + + +# 取整 +def aliquot(a, b): + return a // b + + +if __name__ == '__main__': + print("欢迎使用每日充电计算器!\n") + a1 = int(input("请输入第一个数:")) + operator = input("请输入'+''-''*''/'//''%''squ''值:") + b1 = int(input("请输入第二个数")) + if operator == "+": + result = add(a1, b1) + if operator == "-": + result = sub(a1, b1) + if operator == "*": + result = mul(a1, b1) + if operator == "/": + result = div(a1, b1) + if operator == "//": + result = aliquot(a1, b1) + if operator == "squ": + result = squ(a1, b1) + if operator == "%": + result = remainder(a1, b1) + print("您的结果是:", result) 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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232/\347\254\254\344\272\214\345\221\250_\347\254\2541\350\212\202\350\257\276.md" "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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232/\347\254\254\344\272\214\345\221\250_\347\254\2541\350\212\202\350\257\276.md" new file mode 100644 index 0000000000000000000000000000000000000000..4d6b293026482b03e51570fca56c537b3ecfef9a --- /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\257\217\346\227\245\345\205\205\347\224\265/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232/\347\254\254\344\272\214\345\221\250_\347\254\2541\350\212\202\350\257\276.md" @@ -0,0 +1 @@ +详情请见my_calculator.py \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/QQ\346\210\252\345\233\27620201216182936.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/\346\210\220\345\212\237\346\210\252\345\233\276.jpg" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/QQ\346\210\252\345\233\27620201216182936.jpg" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\346\254\241\344\275\234\344\270\232/\346\210\220\345\212\237\346\210\252\345\233\276.jpg" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\233\233\345\244\247\346\225\260\346\215\256\347\273\223\346\236\204\345\214\205\345\220\253\345\205\255\347\247\215\346\225\260\346\215\256\347\261\273\345\236\213.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\233\233\345\244\247\346\225\260\346\215\256\347\273\223\346\236\204\345\214\205\345\220\253\345\205\255\347\247\215\346\225\260\346\215\256\347\261\273\345\236\213.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..ac38fa979af99865cec0868648b50850b12f2119 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\233\233\345\244\247\346\225\260\346\215\256\347\273\223\346\236\204\345\214\205\345\220\253\345\205\255\347\247\215\346\225\260\346\215\256\347\261\273\345\236\213.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" new file mode 100644 index 0000000000000000000000000000000000000000..098c24b40d7b747f6d80514176c19d75f7da5457 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" @@ -0,0 +1,4 @@ +1.四大数据结构中可变的:list,dict, set; + 不可变的:tuple. +2.四大数据结构中有序的:list, tuple; + 无序的:dict, set. \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/pycharm\344\270\255\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/pycharm\344\270\255\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..0c203bb9d8a41e10d93c2fcc2dc6a57832240e21 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/pycharm\344\270\255\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..36e39af82b5e7c083882e4801f816e2c1b871f0e Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/\345\273\272\347\253\213git\344\273\223\345\272\223\345\220\214\346\255\245\345\210\260\347\240\201\344\272\221.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/\346\277\200\346\264\273\350\231\232\346\213\237\347\216\257\345\242\203.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/\346\277\200\346\264\273\350\231\232\346\213\237\347\216\257\345\242\203.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..0d395e231b4433b9691de9ad0ba92502ca823f2f Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232 12.14 - 12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\346\254\241\344\275\234\344\270\232/\346\277\200\346\264\273\350\231\232\346\213\237\347\216\257\345\242\203.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\23212.21-12.27/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\23212.21-12.27/.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/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\23212.21-12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\23212.21-12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\23212.21-12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/main.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\23212.21-12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/main.py" new file mode 100644 index 0000000000000000000000000000000000000000..ec2a61aca9f6dcdec29f1046ed846de4f738d987 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_A-\346\242\246\345\210\235/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\23212.21-12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/main.py" @@ -0,0 +1,55 @@ +#定义加法运算 +def add(a, b): + result = a + b + return result +#示例 +result = add(2, 3) +print(result) + +#定义减法运算 +def sub(a, b): + result = a - b + return result +#示例 +result =sub(2, 3) +print(result) + +#定义乘法运算 +def mul(a, b): + result = a * b + return result +#示例 +result = mul(2, 3) +print(result) + +#定义除法运算 +def div(a, b): + result = a / b + return result +#示例 +result = div(5, 3) +print(result) + +#定义整除运算 +def div_z(a, b): + result = a // b + return result +#示例 +result = div_z(5, 3) +print(result) + +#定义取余运算 +def div_y(a, b): + result = a % b + return result +#示例 +result = div_y(5, 3) +print(result) + +#定义开方运算 +def kf(a): + result = a ** (1/2) + return result +#示例 +result = kf(9) +print(result) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Bruce/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Bruce/.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/5\347\217\255/5\347\217\255_Bruce/5\347\217\255-Bruce-\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Bruce/5\347\217\255-Bruce-\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..2f9852931649ef233cc7fbede67df342fb581ac3 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Bruce/5\347\217\255-Bruce-\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/hello Python.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\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\232/hello Python.PNG" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/hello Python.PNG" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\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\232/hello Python.PNG" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217path.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\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\232/\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217path.PNG" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217path.PNG" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\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\232/\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217path.PNG" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/\347\254\254\344\270\200\350\212\202\350\257\276\347\254\224\350\256\260-Carmen.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\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\232/\347\254\254\344\270\200\350\212\202\350\257\276\347\254\224\350\256\260-Carmen.md" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/\347\254\254\344\270\200\350\212\202\350\257\276\347\254\224\350\256\260-Carmen.md" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\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\232/\347\254\254\344\270\200\350\212\202\350\257\276\347\254\224\350\256\260-Carmen.md" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/\347\273\210\347\253\257\350\276\223\345\205\245Python\347\273\223\346\236\234.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\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\232/\347\273\210\347\253\257\350\276\223\345\205\245Python\347\273\223\346\236\234.PNG" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/\347\273\210\347\253\257\350\276\223\345\205\245Python\347\273\223\346\236\234.PNG" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\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\232/\347\273\210\347\253\257\350\276\223\345\205\245Python\347\273\223\346\236\234.PNG" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\257\345\220\246\346\234\211\345\272\217\345\217\212\346\230\257\345\220\246\345\217\257\344\273\245\346\233\264\346\224\271\347\232\204\345\210\244\346\226\255.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\257\345\220\246\346\234\211\345\272\217\345\217\212\346\230\257\345\220\246\345\217\257\344\273\245\346\233\264\346\224\271\347\232\204\345\210\244\346\226\255.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..6169b8085f97a9749e6e9f338c2568ddd2a86f03 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\346\230\257\345\220\246\346\234\211\345\272\217\345\217\212\346\230\257\345\220\246\345\217\257\344\273\245\346\233\264\346\224\271\347\232\204\345\210\244\346\226\255.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\254\344\270\211\350\212\202\350\257\276\347\254\224\350\256\260.xmind" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\254\344\270\211\350\212\202\350\257\276\347\254\224\350\256\260.xmind" new file mode 100644 index 0000000000000000000000000000000000000000..1f2e2a6e20266c95823dd8635a24ebd5f8fcc122 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\254\344\270\211\350\212\202\350\257\276\347\254\224\350\256\260.xmind" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\350\257\276\345\220\216\344\275\234\344\270\2323.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\350\257\276\345\220\216\344\275\234\344\270\2323.py" new file mode 100644 index 0000000000000000000000000000000000000000..63ecf3b36d755d8e43dd8fbbc70295f3a44353d6 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\350\257\276\344\275\234\344\270\232/\350\257\276\345\220\216\344\275\234\344\270\2323.py" @@ -0,0 +1,39 @@ + +#整数 +print(type(1)) +#浮点数 +print(type(1.5)) +#字符串 +print(type('hello')) +#布尔值 +print(type(True)) +#二进制 +print(type(b'apple')) +# None +print(type(None)) + +#列表 包含6大数据类型 整数、浮点数、字符串、布尔值、二进制、none +a=[1,1.5,'hello',True,b'apple',None] +print(a) +print(type(a)) +print(len(a)) + +#元组 包含6大数据类型 整数、浮点数、字符串、布尔值、二进制、none +b=(1,1.5,'hello',True,b'apple',None) +print(b) +print(type(b)) +print(len(b)) + +#集合 包含5大数据类型 整数、浮点数、字符串、布尔值、二进制 不包含None +c={1,1.5,'hello',True,b'apple',None} +print(c) +print(type(c)) +print(len(c)) + +#字典 包含6大数据类型 整数、浮点数、字符串、布尔值、二进制、none +c={"A":1,"B":1.5,"C":'hello',"D":True,"E":b'apple',"F":None} +print(c) +print(type(c)) +print(len(c)) + +# 因此集合不能包含None \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232/comment+push\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232/comment+push\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223.png" new file mode 100644 index 0000000000000000000000000000000000000000..70ace5df0e200df32fe30639bda0d1856152987c Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\270\200\345\221\250 \347\254\254\344\272\214\350\212\202\350\257\276\344\275\234\344\270\232/comment+push\345\210\260\350\277\234\347\250\213\344\273\223\345\272\223.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\254\345\233\233\350\212\202\350\257\276\350\277\220\347\256\227\347\254\246.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\254\345\233\233\350\212\202\350\257\276\350\277\220\347\256\227\347\254\246.py" new file mode 100644 index 0000000000000000000000000000000000000000..0ee72b0e40a9b941fcaa4e2e486a0b43c313e66b --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Carmen/5\347\217\255_Carmen_\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\350\257\276\344\275\234\344\270\232/\347\254\254\345\233\233\350\212\202\350\257\276\350\277\220\347\256\227\347\254\246.py" @@ -0,0 +1,62 @@ +# 加法 +def add(a, b): + return a + b + + +print(add(3, 4)) + + +# 减法 +def minus(a, b): + return a - b + + +print(minus(9, 4)) + + +# 乘法 +def product(c, d): + return c * d + + +print(product(9, 4)) + + +# 除法 +def division(a, b): + return a / b + + +print(division(12, 4)) + + +# 整除 +def zhengchu(a, b): + return a // b + + +print(zhengchu(12, 5)) + + +# 取余 +def mod(a, b): + return a % b + + +print(zhengchu(15, 4)) + + +# 指数 +def index(a, b): + return a ** b + + +print(index(2, 4)) + + +# 开方跟 +def sqrt(a, b): + return a ** (1 / b) + + +print(sqrt(16, 2)) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-15\357\274\211.assets/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-15\357\274\211.assets/.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/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/1.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-15\357\274\211.assets/1.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/1.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-15\357\274\211.assets/1.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/2.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-15\357\274\211.assets/2.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/2.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-15\357\274\211.assets/2.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-15\357\274\211.assets/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.md" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.md" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-15\357\274\211.assets/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.md" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232\357\274\21012-19\357\274\211.assets/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232\357\274\21012-19\357\274\211.assets/.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/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232\357\274\21012-19\357\274\211.assets/main.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232\357\274\21012-19\357\274\211.assets/main.py" new file mode 100644 index 0000000000000000000000000000000000000000..dcd85c86b4ff3fcfe2604227622d2976ad4c6d0b --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232\357\274\21012-19\357\274\211.assets/main.py" @@ -0,0 +1,15 @@ +#list实例 +a = [1,2.1,'abc',True,b'hello world',None] +print(a) + +#tuple实例 +b = (1,2.1,'abc',True,b'hello world',None) +print(b) + +#dict实例 +x = {"a":2,"b":2.1,"c":"abc","d":True,"e":b'hello world',"f":None} +print(x) + +#set实例 +c = {1,2.1,"abc",b'hello world',None} +print(c) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232\357\274\21012-19\357\274\211.assets/\344\270\244\351\201\223\351\242\230.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232\357\274\21012-19\357\274\211.assets/\344\270\244\351\201\223\351\242\230.png" new file mode 100644 index 0000000000000000000000000000000000000000..aa970d5486bbca29c0f085f1a1481aa32ef768ed Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232\357\274\21012-19\357\274\211.assets/\344\270\244\351\201\223\351\242\230.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/.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/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..29511f2f76df2aed0e29c93a92c097909cd351b3 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" @@ -0,0 +1,151 @@ +# 第一周-第二节课-随堂笔记 + +## 我们如何通过GIT提交作业? + +### 一、什么是GIT? + +最强大的分布式版本控制系统 + +- 分布式 + + 分布式的意思就是,大家`fork`之后的库,就像细胞分裂一样,彼此之间是平等的,可以互相合并代码。 + + 我们`fork`远程库之后,当前这个库就已经属于我们自己的了。 + + `* 为了教学方便,我们人为的设置了码育谷远程库作为我们的主库` + +- 版本控制 + + 通过分支切换来完成对不同版本的代码控制 + +### 二、我们日常工作中如何使用GIT? + +#### 1⃣️ 安装GIT + +`https://git-scm.com/downloads` + +#### 2⃣️ 如何在Pycharm中配置git + +`https://www.cnblogs.com/panpanda/p/13084313.html` + +#### 3⃣️ 查看安装的路径 + +`which git` + +#### 4⃣️ 如何使用git + +##### 4.1 本地上传到远程库 + +- 在代码托管平台新建远程库 + +- 配置用户(一个环境只用配置一次) + +- 初始化一个git仓库(本地代码仓库) + + - `git init` + +- 配置远程仓库(远程代码仓库) + + - ``` + git remote add origin https://gitee.com/kojay18/git_test.git + ``` + +- 新建`.gitignore`文件 + + 用来屏蔽不需要提交到项目的文件和文件夹 + + - 默认要屏蔽的文件和文件夹 + - `.idea` + - `.git` + - /venv/ + - /test/ + - `*/__pycache__/` + +- 选择要提交的项目文件 + + - 批量全部添加(不建议使用) + + `git add ./*` + + - 添加单个文件(建议) + + `git add xx/xx` + + - 通过Pycharm手动添加 + +- 提交项目 + + - commit + + 提交到你的本地库 + + - push + + 提交到远程库 + + - commit and push + + 二合一,提交到本地库和远程库 + +##### 4.2 远程库同步到本地库 + +- `git clone https://gitee.com/kojay18/git_test.git` + +##### 4.3 更新代码 + +- `git pull` + +##### 4.4 解决代码冲突 + +当本地代码更新时发现和远程代码有冲突 + +- 左边是本地当前的代码 +- 右边是远程库的代码 +- 中间是最后选取的结果 + +##### 4.5 历史回滚 + +- 右键目标文件或文件夹,点击history +- 回滚部分代码 -> 在弹出窗口右侧进行修改 +- 整个文件回滚 -> 右键revert + +##### 4.6 注意事项 + +- 一定要先新建`.gitignore` +- 不要在服务器/生产环境下直接修改代码 + +### 三、Python的虚拟环境 + +``` +* 新建一个新项目的时候,一定要先新建一个虚拟环境。 +``` + +一个与系统环境隔离的空间 + +#### 1⃣️ 虚拟环境的好处 + +- 与系统环境隔离,不会污染正式环境 +- 更新项目方便简洁 +- 通过`requirements.txt`解决不同平台,不同环境下的环境同步问题 + +#### 2⃣️ 新建虚拟环境 + +``` +python3 -m venv venv +``` + +#### 3⃣️ 激活虚拟环境 + +``` +# windows +venv\Scripts\Activate.bat + +# unix(Mac,ubuntu,centos) +source venv/bin/activate +``` + +### 四、作业 + +- 新建一个项目,建立虚拟环境,在Pycharm配置虚拟环境 +- 建立git仓库,并同步到码云 + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" new file mode 100644 index 0000000000000000000000000000000000000000..29ffa14ce84f1a66e5620559717beb89cff38ea4 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" new file mode 100644 index 0000000000000000000000000000000000000000..21af25076d89c70cf2e2265d59dc5e22b8e942dc Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" new file mode 100644 index 0000000000000000000000000000000000000000..4aa82079edbbb0c1ff56d2338cd6c743fdf8d688 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" new file mode 100644 index 0000000000000000000000000000000000000000..d3ed264eafbdd709338f83cd3df5faf303403c20 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232\357\274\21012-17\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232.12.21 - 12.27/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232.12.21 - 12.27/.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/5\347\217\255/5\347\217\255_H/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232.12.21 - 12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-22\357\274\211.assets/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232.12.21 - 12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-22\357\274\211.assets/.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/5\347\217\255/5\347\217\255_H/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232.12.21 - 12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-22\357\274\211.assets/my_calculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232.12.21 - 12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-22\357\274\211.assets/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..faa69dc101304476623d291fb6e48f17af740f5b --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_H/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232.12.21 - 12.27/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232\357\274\21012-22\357\274\211.assets/my_calculator.py" @@ -0,0 +1,37 @@ +def jia(x, y): + jia_res = print(x + y) + return jia_res + +def jian(x, y): + jian_res = print(x - y) + return jian_res + +def cheng(x, y): + cheng_res = print(x * y) + return cheng_res + +def chu(x, y): + chu_res = print(x / y) + return chu_res + +def zc(x, y): + zc_res = print(x // y) + return zc_res + +def qy(x, y): + qy_res = print(x % y) + return qy_res + +def kf(x): + kf_res = print(x ** (1 / 2)) + return kf_res + +result = jia(1, 2) +result = jian(1, 2) +result = cheng(1,2) +result = chu(1,2) +result = zc(1,2) +result = qy(1,2) +result = kf(2) + +print(result) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/1.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/1.png" new file mode 100644 index 0000000000000000000000000000000000000000..60f6f2e15c305577efaafdb3bde7b5f375e887dd Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/1.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/2.jpg" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/2.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..1ea82ddeff5e7f26bf7e1916ae28aa107083aad9 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232/2.jpg" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\2322020-12-20/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\2322020-12-20/.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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\2322020-12-20/\347\254\2541\343\200\2012\351\227\256--\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213\347\232\204\345\210\206\347\261\273.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\2322020-12-20/\347\254\2541\343\200\2012\351\227\256--\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213\347\232\204\345\210\206\347\261\273.md" new file mode 100644 index 0000000000000000000000000000000000000000..2ca8d99684260606ccc8b150f51b02b4a478e04c --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\2322020-12-20/\347\254\2541\343\200\2012\351\227\256--\345\233\233\345\244\247\346\225\260\346\215\256\347\261\273\345\236\213\347\232\204\345\210\206\347\261\273.md" @@ -0,0 +1,9 @@ +**四大数据类型的分类** + +- 是否可以更改 + - 可以更改:list(列表)、dict(字典)、set(集合) + - 不可更改:tuple(元祖) +- 是否有序 + - 有序:list(列表)、tuple(元祖) + - 无需:dict(字典)、set(集合) + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\2322020-12-20/\347\254\2543\351\227\256--\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276\345\220\216\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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\2322020-12-20/\347\254\2543\351\227\256--\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276\345\220\216\344\275\234\344\270\232.py" new file mode 100644 index 0000000000000000000000000000000000000000..78b8a002af7bd24ea1cfa85a7439b4ab478f2114 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202\344\275\234\344\270\2322020-12-20/\347\254\2543\351\227\256--\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276\345\220\216\344\275\234\344\270\232.py" @@ -0,0 +1,19 @@ +#list(列表) 六大基本类型:int float string bool bytes none +a=[1, 2.0, 'hello world', True, b'one', None] +print(a) +print(type(a)) + +#tuple(元祖) 六大基本类型:int float string bool bytes none +b=(1, 2.0, 'hello world', True, b'one', None) +print(b) +print(type(b)) + +#set(集合) 六大基本类型:int float string bool bytes none +c={1, 2.0, 'hello world', True, b'one', None} +print(c) +print(type(c)) + +#dict(字典) 六大基本类型:int float string bool bytes none +d={"A":1, "B":2.0, "C":'hello world', "D":True, "E":b'one', "F":None} +print(d) +print(type(d)) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/.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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\270\200\351\227\256\343\200\201\346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\270\200\351\227\256\343\200\201\346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..99ee9e8c7daed4069ef7820005177127ed451389 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\270\200\351\227\256\343\200\201\346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\272\214\351\227\256\343\200\201\346\226\260\345\273\272git\344\273\223\345\272\223\345\271\266\345\220\214\346\255\2451.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\272\214\351\227\256\343\200\201\346\226\260\345\273\272git\344\273\223\345\272\223\345\271\266\345\220\214\346\255\2451.png" new file mode 100644 index 0000000000000000000000000000000000000000..0911ee6a7446f76fa582055d2c34ee8c9ca9bdd0 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\272\214\351\227\256\343\200\201\346\226\260\345\273\272git\344\273\223\345\272\223\345\271\266\345\220\214\346\255\2451.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\272\214\351\227\256\343\200\201\346\226\260\345\273\272git\344\273\223\345\272\223\345\271\266\345\220\214\346\255\2452.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\272\214\351\227\256\343\200\201\346\226\260\345\273\272git\344\273\223\345\272\223\345\271\266\345\220\214\346\255\2452.png" new file mode 100644 index 0000000000000000000000000000000000000000..b064fbacf1fe0f29839403bbad6630a48a8d8359 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\270\200\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\2322020-12-19/\347\254\254\344\272\214\351\227\256\343\200\201\346\226\260\345\273\272git\344\273\223\345\272\223\345\271\266\345\220\214\346\255\2452.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\272\214\345\221\250_\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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\272\214\345\221\250_\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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\272\214\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\272\214\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/.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/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\272\214\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/my_calculator.py.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\272\214\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/my_calculator.py.py" new file mode 100644 index 0000000000000000000000000000000000000000..78b8a002af7bd24ea1cfa85a7439b4ab478f2114 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_Leo_\345\256\227\350\277\234/\347\254\254\344\272\214\345\221\250_\344\275\234\344\270\232\346\217\220\344\272\244/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202/my_calculator.py.py" @@ -0,0 +1,19 @@ +#list(列表) 六大基本类型:int float string bool bytes none +a=[1, 2.0, 'hello world', True, b'one', None] +print(a) +print(type(a)) + +#tuple(元祖) 六大基本类型:int float string bool bytes none +b=(1, 2.0, 'hello world', True, b'one', None) +print(b) +print(type(b)) + +#set(集合) 六大基本类型:int float string bool bytes none +c={1, 2.0, 'hello world', True, b'one', None} +print(c) +print(type(c)) + +#dict(字典) 六大基本类型:int float string bool bytes none +d={"A":1, "B":2.0, "C":'hello world', "D":True, "E":b'one', "F":None} +print(d) +print(type(d)) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/.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/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1215\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1215\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_\344\272\221/1215\345\256\211\350\243\205\346\210\252\345\233\276.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1215\344\275\234\344\270\232/1215\345\256\211\350\243\205pycharm\346\210\252\345\233\276.PNG" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/1215\345\256\211\350\243\205\346\210\252\345\233\276.PNG" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1215\344\275\234\344\270\232/1215\345\256\211\350\243\205pycharm\346\210\252\345\233\276.PNG" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202(1215yun).md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1215\344\275\234\344\270\232/1215\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202(1215yun).md" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202(1215yun).md" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1215\344\275\234\344\270\232/1215\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202(1215yun).md" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217git\345\256\211\350\243\205001.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217git\345\256\211\350\243\205001.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..1661f005c7ed018312e5bef503d8749d39f11033 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217git\345\256\211\350\243\205001.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217py\350\231\232\346\213\237\347\216\257\345\242\203.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217py\350\231\232\346\213\237\347\216\257\345\242\203.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..b27adebc0ff6af968e4b3f55eab14180170d87de Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217py\350\231\232\346\213\237\347\216\257\345\242\203.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202(1217yun).md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202(1217yun).md" new file mode 100644 index 0000000000000000000000000000000000000000..ac3bad22ddf9fbcbd12f69f0fb3f4ce0fca2f46f --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1217\344\275\234\344\270\232/1217\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202(1217yun).md" @@ -0,0 +1,123 @@ +# 第一周_第二节(1217) + +## Git + +``` +版本控制系统; +分布式: +fork之后的库,如同细胞分裂,彼此平等,可以互相合并代码; +fork远程的库,之后,这个库就属于我们了; +本次教学:码育谷远程库作为主库; +版本控制:分支切换,对不同版本的代码进行控制; +版本控制: +1、不用备份一个有一个文件 +2、合并大家的改动 +``` + +## 使用Git + +``` +安装Git;将git添加至环境变量; +在Pycharm中配置Git:百度经验: +https://jingyan.baidu.com/article/ff42efa9c7bd12c19e22028a.html +查看安装路径:where git +``` + +## 具体使用Git: + +- 本地上传到远程库 + +``` +在代码托管平台新建远程库; +配置用户(一个环境只用配置一次); +初始化一个Git仓库:git init +配置远程仓库:git remote add origin https://gitte.com/tunangit/git_test.git +新建.gitignore文件,用来屏蔽不需要提交到项目的文件和文件夹; +``` + +- .gitignore文件的使用: + + ``` + 默认需要屏蔽的文件和文件夹: + .idea + .git + /venv/ + /test + */__pycache__/ + 选择要提交的项目文件: + 批量全部添加:(不建议)git add ./* + 添加单个文件:git add xx/xx + 通过pycharm手动添加; + ``` + +- 提交项目 + + ``` + commit 提交到本地库 + push 提交到远程库 + commit and push 二合一,提交到本地库和远程库 + ``` + +- 远程库提交 到本地库 + + ``` + https://gitee.com/xxx/xxxx.git + 更新代码:git pull + ``` + +- 解决代码冲突: + + ``` + 当地代码更新时发现和远程代码有冲突; + 左边是本地当前的代码; + 中间是最后选取的代码; + 右边是远程库的代码; + ``` + +- 历史回滚 + + ``` + 右键目标文件或者文件夹,点击history + 回滚部分代码-在弹出窗口右侧进行修改 + 整个文件回滚-右键revert + ``` + +- 注意事项 + + ``` + 先建.gitignore + 不在服务器/生产环境下 直接修改代码 + ``` + +## Python的虚拟环境: + +``` +新建一个项目时,先新建一个虚拟环境;一个与系统环境隔离的空间; +``` + +### 虚拟环境的好处: + +``` +与系统环境隔离,不会污染正式环境; +更新项目时,方便,简洁; +可以通过requirements.txt解决不同平台、不同环境下的环境同步问题; +``` + +### 新建虚拟环境 + +``` +pyhton -m venv venv001 +``` + +### 激活虚拟环境 + +``` +venv\Scripts\Activate.bat +``` + +# 课后作业 + +``` +新建一个项目,建立虚拟环境,在Pycharm中配置虚拟环境; +建立Git仓库,同步到码云; +``` \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219week001_lianxipy001.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219week001_lianxipy001.py" new file mode 100644 index 0000000000000000000000000000000000000000..585a03c9063b34387f85ebf5d45f8f5bb1dbe76f --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219week001_lianxipy001.py" @@ -0,0 +1,39 @@ +# # print("hello,pycharm and github") +# # 1219-night +# x=20 +# y=None +# z=12.0 +# q=str("hello,zhu") +# m=True +# w=bytes(3) +# print(x,y,z,q,m,w) +# print("1\n222") +# m1=float('INF') +# print(m) +# print(m) +# print(m1+3) +# print(float("inf")) +# print(float("-inf")) +# print(1+float("inf")) +# print(str(34)) #'34' +# print(bytes("hello".encode("utf-8"))) #b'hello' +# l1=[1,2.0,"34erere5",None,True,] +# print(l1) +# l2=list("hello") +# print(l2) +# print(l2[3]) +# t1=tuple("hello") +# print(t1) +# t2=(1) +# print(t2) +# print(type(t2)) +d1={'a':1,'w':3} +print(d1) +set([1,2,2]) + + + + + + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202(1219yun) .md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202(1219yun) .md" new file mode 100644 index 0000000000000000000000000000000000000000..6ca598b79551abb05d462e355649a544378c12b3 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202(1219yun) .md" @@ -0,0 +1,111 @@ +# 第一周_第三节(1219) + +# 1变量和赋值 + +- 变量:一个实体的指代,查看变量的内存地址: + + ``` + id(x) + ``` + +- 可以重新赋值,被重新赋值之后的值,被系统回收了; +- Python没有常量这个数据类型;通常大写字母为常量; + +# 2 Python的六大基本类型 + +``` +通过type()来查看变量的数据类型; +``` + +``` +前三种:int()、float()、str(); +int('1') +float('1.0') +浮点数,强调的是小数的表现形式; + +float('INF') 无限,最大;可以用它来初始化最大值; +图论里边,做图的路径计算时候,需要无穷大,表示这个点不可到达; +print(float("inf")) inf +print(float("-inf")) -inf +print(1+float("inf")) inf + +str(2) +2468 +'' +"" +'''''' +""""" +转义字符:\:告诉Python解释器,要表示一个字符,要表示一个特殊字符; +"2\n" +"2\"" +``` + +``` +后三种:boolean()、bytes()、None; +boolean布尔值,True-1、False-0 +bool(2) +bool(0) + +bytes()二进制的表示;返回一个新的 bytes 对象。 +bytes("hello".encode("utf-8")) b'hello' + +None空 +False和0有时候也代表一种结果; +``` + +# 3Python的四大基本数据结构 + +## 3-1列表 + +``` +列表:用来装载不同数据类型的数据集结构 +特点:有序、可改、可装载任意数据类型 +list("hello world") +a=[1,2,3] +``` + +## 3-2元组 + +``` +常量列表; +特点:有序、不可改、可装载不同数据类型 +tupple("hello") +a=(1,2,3) +b=(1,) 逗号才是声明元组的灵魂 b=(1) 是int类型 +``` + +## 3-3字典 + +``` +字典,hashtable,hash函数,散列函数,将传入的key值生成地址来查找value +key->hash函数->value地址->value值 +key必须是可hash的,不可改的,唯一的 +特点:无序、可改 +dict(a=2) +a={"a":2} +d1={'a':1,'w':3} +``` + +## 3-4集合 + +``` +其实是没有value的字典; +特点:无序、可改、不可重复、key是可hash的; +set([1,2,2]) +{1,2} +``` + +# 课后作业 + +``` +1-四大数据结构,可变不可变? +可变:列表、字典、集合; +不可变:元组 +2-四大数据结构,有序无序? +有序:列表、元组 +无序:字典、集合 +3-创建list、tupple、dict、set,每个数据结构需要包括六大基本类型; +六大基本类型: +int、float、str、 boolean、bytes()、None +``` + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202(1219yun) .png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202(1219yun) .png" new file mode 100644 index 0000000000000000000000000000000000000000..09a423c9b416cd0356976eaacde939e28b9a6dd0 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\270\200\345\221\2501214-1220/1219\344\275\234\344\270\232/1219\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202(1219yun) .png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\272\214\345\221\2501221-1227/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\272\214\345\221\2501221-1227/.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/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\272\214\345\221\2501221-1227/2-1-\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202(1222yun).md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\272\214\345\221\2501221-1227/2-1-\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202(1222yun).md" new file mode 100644 index 0000000000000000000000000000000000000000..1169569777a6e5337f23387ae2927f080d3c3265 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\272\214\345\221\2501221-1227/2-1-\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202(1222yun).md" @@ -0,0 +1,243 @@ +# 第二周_第一节(1222) + +# Python函数 + +参数列表、函数体、返回值 + +可以直接被另外一段程序引用,也叫子程序、子方法。 + +- 可以重复使用 +- 可以互相调用 + +在python中定义一个函数: + +```python +def add(x,y): + return x+y + +def foo(arg): + return "Hello " + str(arg) +``` + +## 函数的参数 + +必填参数、关键字参数(可以无视顺序)、默认参数 + +``` +必传参数:平时最常用的,必传确定数量的参数 +缺省参数:在调用函数时可以传也可以不传,如果不传将使用默认值 +可变参数:可变长度参数 +关键字参数:长度可变,但是需要以 key-value 形式传参 + +必填在前,缺省在后; +``` + +### 必填参数 + +```python +# 必填参数a,缺省参数b +def test1(a, b=3): + print(a, b) + +test1(0) +test1(0, 1) + +def foo(arg='tunan', arg_2=None)#默认参数 +``` + +### 关键字参数 **dict + +```python +**省略了关键字参数dict + +def foo(arg=None, arg_2=None)#关键字参数 + +def test3(a, b=2, **kwargs): + print(a, b, kwargs) + +test3(1, 3) +test3(1, **{"key": "value"}) +test3(1, 3, **{"key": "value", "key1": "val", "key2": 'val2'}) +test3(1, name="yy", key="value") +test3(1, 3, name="yy", key="value") +test3(1, name="yy", key="value",b=222222) +# test3(1, 22,name="yy", key="value",b=22) 会报错,因为第二个值已经传给缺省参数b了 + +kwargs 是一个字典类型 +关键字参数可传可不传 +传值的时候需要传键值对,如果要传dict需要在前面加上 ** ,表示将这个dict的所有key-value当成独立的关键字参数(变成key=value)传入到kwargs,而修改kwargs不会影响原来的dict +不用dict的话也可以直接 key=value 的写法,如果和缺省参数重名,若前面没有传值的话,会当成缺省参数传值;若有的话会直接报错 +声明函数时,缺省参数在前,可变参数在后; +``` + +### 可变参数 *tuple + +```python +不定长参数,在装饰器中大量使用; +*可以接受任意长度的参数,省略了参数 tuple + +def test2(num, num2=2, *args): + print(num, num2, args) + +test2(1) #1 2 () +test2(1, 3) #1 3 () +test2(1, 3, 3, 3, 3, 3, 3) #1 3 (3, 3, 3, 3, 3) +test2(1, *(2, 3, 4, 5)) #1 2 (3, 4, 5) +test2(1, *[2, 3, 4, 5]) #1 2 (3, 4, 5) + +args是一个元组类型 +可变参数可不传,也可以传很多个值 + +*(2, 3, 4, 5) ,在元组or列表前面加一个 * ,代表将里面的每个元素独立出来,单独作为一个形参传进去; +print(*(1, 2, 3, 4)) +# 输出1 2 3 4 +``` + +### 4种参数类型 + +```python +def test4(a, b=2, *args, **kwargs): + print(a, b, args, kwargs) + +test4(1) #1 2 () {} +test4(1, 1) #1 1 () {} +test4(1, *(1, 2, 3, 3, 4,)) #1 1 (2, 3, 3, 4) {} +test4(1, *(1, 2, 3, 3, 4,), cc=123, c=123) +#1 1 (2, 3, 3, 4) {'cc': 123, 'c': 123} + +lists = ["a", "b"] +dicts = {"key": 123} +test4(1, *lists, **dicts) #1 a ('b',) {'key': 123} + + + + +https://www.cnblogs.com/poloyy/p/12526592.html + +``` + + 函数体、返回值; + +默认返回None + +# python运算符 + +## 基础运算符 + +``` ++-*/ // 取整 %取余 **次方 abs()绝对值 += < > >= == != +``` + +比较两个变量的内存地址:is、 is not + +int的时候,需要考虑python的常量池 + +``` +a = "test_1" +b = "test_1" + +a is b +>>> False + +a = '你好' +b = '你好' +a is b +>>> True +``` + +判断元素是否在当前序列当中 in + +``` +in、 not in +a = [1,2,3] +1 in a +>>> True + +b = [1, 2] +b in a +>>> False + +``` + +逻辑运算符 + +``` +and、or、not取反 +短路: +表达式A or 表达式B +当表达式A为True时, 表达式B就不会运行 + +``` + +## 位运算 + +学习:https://www.cnblogs.com/Neeo/articles/10536202.html + +``` +~ +^ +>> +<< +& +| +``` + +## Python运算符优先级 + +| 运算符 | 描述 | +| ---------------------------------- | ---------------------------------- | +| or | 布尔运算或 | +| and | 布尔运算与 | +| not | 布尔运算逻辑取反 | +| in, not in, is, is not, <, !=, ... | 比较运算, 成员检测运算, 标识号检测 | +| +, - | 加法和减法 | +| *, /, //, % | 乘法, 除法, 整除, 取余 | +| +x, -x | 正负数 | +| ** | 幂 | + +``` +如果不确定优先级,用()来自定义优先级; +例如:(not b and c) or (1+a) +``` + +# 作业 + +``` +用函数实现一个具有加, 减, 乘, 除, 整除, 取余, 开方的计算器; +my_calculator.py + +def add(a, b): + ... +def sqrt(a, b): + ... + +在交互模式中练习Python运算符 +``` + +```python +# 用函数实现一个具有加, 减, 乘, 除, 整除, 取余, 开方的计算器; +def add(a, b): + return a+b +def jian(a, b): + return a-b +def cheng(a, b): + return a//b +def chu(a, b): + return a%b + +def yu(a, b): + return a%b +def sqrt(a, b): + return a**b +if __name__=="__main__": + a=18 + b=4 + print(add(a,b)) + print(jian(a,b)) + print(cheng(a,b)) + print(chu(a,b)) + print(yu(a,b)) + print(sqrt(a,b)) +``` + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\272\214\345\221\2501221-1227/my_calculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\272\214\345\221\2501221-1227/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..0f6192b832ef32f08eec674c872dd9dd1611349d --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\344\272\221/\347\254\254\344\272\214\345\221\2501221-1227/my_calculator.py" @@ -0,0 +1,23 @@ +# 用函数实现一个具有加, 减, 乘, 除, 整除, 取余, 开方的计算器; +def add(a, b): + return a+b +def jian(a, b): + return a-b +def cheng(a, b): + return a//b +def chu(a, b): + return a%b + +def yu(a, b): + return a%b +def sqrt(a, b): + return a**b +if __name__=="__main__": + a=18 + b=4 + print(add(a,b)) + print(jian(a,b)) + print(cheng(a,b)) + print(chu(a,b)) + print(yu(a,b)) + print(sqrt(a,b)) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/.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/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-1 \350\256\276\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-1 \350\256\276\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..2a48ed6cd607c4950cb71f932e1bbe3eb0702a21 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-1 \350\256\276\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-2 Python \345\256\211\350\243\205.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-2 Python \345\256\211\350\243\205.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..97d9d008b065b5ce0121ee5cdd75e116f41307ab Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-2 Python \345\256\211\350\243\205.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-3 Pycharm Print.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-3 Pycharm Print.png" new file mode 100644 index 0000000000000000000000000000000000000000..94508c0e4bab6ab6c48f34ebed9c3f3c0e14ac1e Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/#1-1-3 Pycharm Print.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\200\350\212\202 \347\254\224\350\256\260 20201215 LQ.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\200\350\212\202 \347\254\224\350\256\260 20201215 LQ.md" similarity index 100% rename from "\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\200\350\212\202 \347\254\224\350\256\260 20201215 LQ.md" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232.12.15/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\200\350\212\202 \347\254\224\350\256\260 20201215 LQ.md" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232.12.19/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232.12.19/.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/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232.12.19/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260 20201219.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232.12.19/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260 20201219.md" new file mode 100644 index 0000000000000000000000000000000000000000..07cdaeb137aeacdd6f8df9517d696fb5da28efb8 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232.12.19/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260 20201219.md" @@ -0,0 +1,232 @@ +# 第一周-第三节-随堂笔记 20201219 + +## 变量和赋值 + +- 什么是变量? + + - 一个实体的指代 + + - 查看变量的内存地址 + + ``` + id(x) + ``` + + - 可变化,可重新赋值 + + - 为变量赋值 + + - 通过 = 来赋值 + + ``` + x = 3 + ``` + + - 被重新赋值之后的值去哪了? + + - 被系统回收了 + + - Python的常量 + + - Python没有常量这个数据类型 + - 程序员之间约定,如果这个变量的命名都是大写字母,就将被视为一个常量 + +## Python的六大基本类型 + +强调**基本类型** 的原因是数据类型和数据结构指向的范围更加广泛,不要产生错误的认识或者思维定式 + +- 通过type()函数来查看当前变量的数据类型 + +- Int(整数) + + ``` + int() #转为整数数据类型 + ``` + +- float (浮点数) + + ``` + float() #转为浮点数数据类型 + ``` + + - 计算机内部只能识别0或1,浮点数强调的是小数的表现形式 + +- string (字符串,字符序列) + + ``` + str() #转为字符串数据类型 + ``` + + - 在有些语言中,单个字符也是一个基本的数据类型 (Char) + + - 有序的 + + - 如何表示字符串? + + ``` + " " + '' + '''' + """" + ``` + + - 转义字符 + + 告诉python解释器,我们当前要表示的是一个字符或者是特殊字符 + + - 通过 \ 来转义 + - \n 换行 + + - boolean (布尔值) + + 用来表示 True 或者 False + + - True 等价于1 + + - Flase 等价于0 + + ``` + bool(2) ---True + bool(0) ---False + ``` + + - bytes (二进制系列) + + 二进制的表示形式 + + - None (空) + + - 有了False和0 为啥还需要None + + 因为False和0有时也代表了一种结果 + +## Python的四大基本数据结构 + +- list(列表) + + - 什么是列表? + + 用来转载**不同数据类型**的数据结构 + + - 列表的特点 + + - 有序 + - 可以转载任意数据类型 + - 可更改 + + - 如何表示list? + + - 通过list() 新建一个列表 + + ``` + list("hello world") + ``` + + - 通过[ ] 声明一个列表 + + ``` + a = [1,2,3] + ``` + +- tuple(元祖) + + - 什么是元祖? + + 可以认为,元祖是不可修改的列表,常用来表示记录 + + - 元祖的特点? + + - 有序 + - 可以转载任意的数据类型 + - 不可更改 + + - 如何表示tuple + + - 通过tuple() 新建一个元祖 + + ``` + tuple("hello") + ``` + + - 通过(,)来声明一个元祖 + + ``` + a = (1,2,3) + + #声明单个元素的元祖,要添加逗号 + a = (1, ) + ``` + +- dict(字典) + + - 什么是字典? + + 字典也叫 hashtable, 通过hash(散列函数)将传入的key值生成地址来查找value + + key -> hash 函数 ->返回了value的地址 ->通过地址返回value值 + + - 字典的特点? + + **无序** + + Python3.6 是有序的,无视这一点 + + - 字典中的key必须是可hash(不可更改,唯一的) + - ???可更改??? + + - 如何表示字典? + + - 通过dict() 来创建字典 + + ``` + dict(a=2) + ``` + + - 通过{ } 来声明一个字典 + + ``` + a = {"a": 2} + ``` + +- set(集合) + + - 什么是Set + + set其实就是没有value的字典 + + - Set (集合) 的特点 + + - 无序的 + - 集合中的Key 必须是可hash的 + - 可以更改 + - 元素是唯一的 + + - 如何表示Set + + - 通过set()来创建集合 + + ``` + set([1,2,2]) + ``` + + - 通过{ } 来表示 + + ``` + {1,2,3} + ``` + +## 课后作业 + +- 四大基本数据结构中哪些是可变的,哪些是不可变的? + + **可变的数据结构:list(列表),dict(字典),set(集合)** + + **不可变的数据结构:tuple (元祖)** + +- 四大基本数据结构中哪些是有序,哪些是无序的? + + **有序的数据结构:list(列表),tuple (元祖)** + + **无序的数据结构:dict(字典),set(集合)** + +- 创建set, list, dict, tuple实例每个数据结构的实例需要包括六大基本类型 \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-1-GIT\350\260\203\347\224\250.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-1-GIT\350\260\203\347\224\250.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..1cb7a26fc0e5d0521f7017c357aa9fc0c8648751 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-1-GIT\350\260\203\347\224\250.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-2-GIT\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-2-GIT\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..b17b7616dd7980423c76b27390cc4cb2a3f78748 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-2-GIT\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-3-\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\203.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-3-\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\203.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..9dbceb24e4ab2b242a4a92b460fd8055cfd325f7 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-3-\345\273\272\347\253\213\350\231\232\346\213\237\347\216\257\345\242\203.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-4-\346\217\220\344\272\244\345\210\260\350\277\234\347\250\213\345\272\223.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-4-\346\217\220\344\272\244\345\210\260\350\277\234\347\250\213\345\272\223.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..2f4e78eb159a669c55bfe847009c43d3b505270e Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/#1-2-4-\346\217\220\344\272\244\345\210\260\350\277\234\347\250\213\345\272\223.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/.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/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260 20201217.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260 20201217.md" new file mode 100644 index 0000000000000000000000000000000000000000..b4d996cdc3bb7167d750bf17cbfdaf50e033a822 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\210\230\345\274\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232.12.17/\347\254\254\344\270\200\345\221\250-\347\254\254\344\272\214\350\212\202-\351\232\217\345\240\202\347\254\224\350\256\260 20201217.md" @@ -0,0 +1,183 @@ +# 第一周-第二节-随堂笔记 + +#### 1,如何通过GIT来提交作业 + +###### 什么是GIT? + +最强大的**分布式**版本控制**系统** + +- 分布式 + + 分布式指的是成员fork之后的库,就像细胞分裂一样,彼此库是平等的,可以互相合并代码 + + 我们fork远程库之后,当前的库就已经属于我们自己 + + ``` + *此次,我们认为设置码育谷远程库作为主库 + ``` + +- **版本控制** + + ``` + *通过分支切换,实现对不同版本的代码控制 + ``` + +#### 2. GIT 的使用 + +- 安装 + + ``` + https://git-scm.com/downloads + ``` + +- 将GIT添加到环境变量 (https://jingyan.baidu.com/article/ff42efa9c7bd12c19e22028a.html) + + ``` + D:\Downloads\Git\cmd\git.exe + ``` + +- Pycharm配置GIT + + ``` + File-Setting-Version control-Path-Test + ``` + + - 查看安装路径 + + ``` + - where git (windows) + - which git (linux) + ``` + +- 如何调用Git + - **本地上传到远程库** + + - 在平台上新建远程库 + + - 配置用户 (一个环境只用配置一次) + + ``` + git config --global user.name "刘强" + git config --global user.email "liuqiangbio@126.com" #设置邮箱# + ``` + + - 初始化一个git仓库 + + ``` + git init + ``` + + - 配置远程仓库(远程代码仓库) + + ``` + git remote add origin https://gitee.com/plantsanseido/git_test.git + ``` + + - 选择要提交的项目文件 + + - 批量全部添加(不建议) + + ``` + git add ./* + ``` + + - 添加单个文件 + + ``` + git add xx/xx + ``` + + - 通过Pycharm手动添加 + + ``` + 文件选中, git处后选择 add,完成手动添加 + ``` + + - 新建 gitignore文件 + + 用来屏蔽不需要提交上传到项目的文件或文件夹 + + - 最好要默认要屏蔽的文件和文件夹 + + - ``` + .idea + .git + /venv/ + /test/ + */__pycache__ #* 代表所有目录, pycache: python代码翻译成自解码供机器读取,非每次都有,仅第一次出现。 + ``` + + - 提交项目 + + - commit + + 提交到自己的本地库 + + - push + + 提交到远程库 + + - commit and puch + + 二合一,提交到本地库和远程库 + + Note: (git init)要在文件添加之前建立,以防止不需要的文件(如.idae)等上传 + + - 远程同步到本地库 + + ``` + https://gitee.com/xxx(用户名)/xxx(项目名).git + ``` + + - 更新代码 + + ``` + git pull + ``` + + - 解决代码冲突 + + 当本地代码更新时发现和远程代码有冲突 + + - 左边是本地当前代码 + - 右边是远程库代码 + - 中间是最后选择读取的结果 + + - 历史回滚 + - 右键目标文件或者文件夹 点击 history + - 回滚部分代码 -> 在弹出窗口右侧进行修改 + - 回滚整个文件 -> 右键 revert + + - **注意事项** + + - 一定要先新建 .gitigonre + - 不要在服务器/生产环境下直接修改代码 + +#### 3. Python 的虚拟环境 + +一个与系统环境隔离的空间 + +- 虚拟环境的好处 + + - 与系统环境隔离,不会污染正式环境 + - 更新项目方便简洁 + - 通过" requiorement.txt "解决不同平台,不同环境下的环境同步问题 + +- 新建虚拟环境 + + ``` + python -m venv venv # windows环境 + ``` + +- 激活虚拟环境 + + ``` + venv\Scripts\Activate.bat #windows + source venv/bin/active #Linux + ``` + +课后作业 + +- 新建一个项目, 建立虚拟环境,在pycharm配置虚拟环境 +- 建立Git仓库。并同步码云 + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/.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/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/.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/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/python\345\256\211\350\243\205.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/python\345\256\211\350\243\205.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..e7e8ffba622ed473f73252ce10bb0d295f8c9818 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/python\345\256\211\350\243\205.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/\346\211\223\345\215\260\346\225\260\346\215\256.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/\346\211\223\345\215\260\346\225\260\346\215\256.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..48429c306e48d4bc5bc202b77a40564ec4492d5e Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/\346\211\223\345\215\260\346\225\260\346\215\256.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/\351\205\215\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/\351\205\215\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..b6d5825d7f45db400b3ae92062acbb1cd698f884 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232(12.20)/\351\205\215\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/main.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/main.py" new file mode 100644 index 0000000000000000000000000000000000000000..394f073102c4d0c9767abeb4a93a7900bb086585 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/main.py" @@ -0,0 +1,30 @@ +# int +a = int('1') + +# float +b = float('1.0') + +# string +c = str("abc") +d = str('d') + +# boolean +e = bool(2) + +# list +l =[a, b, c, e, a,bin(2),None] + +# tuple +t = (a, b, c, e, b,bin(2),None) + +# dict +d = {1: a,3: b,4: c,5: e,6:bin(2),7:None} + +# set +s = set(l) + + +print(l) +print(t) +print(d) +print(s) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..c3a468887d6594c7180e42e4d47bb573bbd22efa --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" @@ -0,0 +1,213 @@ +## 第一周第三节课-随堂笔记 + +## 变量和赋值 + +- 什么是变量 + + - 一个实体的指代 + + - 查看变量的内存地址 + + ``` + id(x) + ``` + + - 可重新赋值 + +- 为变量赋值 + + - 通过=来赋值 + + ``` + x=3 + ``` + + - 被重新赋值之后的值去哪了 + - 被系统回收了 + +- python常量 + - python没有常量这个数据类型 + - 程序员之间约定命名为大写字母的为常量 + +## python的六大基本类型 + +- 强调基本的原因数据类型和数据结构指向的范围更加广泛,不要产生错误的认知,形成思维定式 + +- 通过type()函数来查看当前变量的数据类型 + + - Int(整数) + + ``` + int('1') + ``` + + - float(浮点数) + + ``` + float('1.0') + float('INF') + ``` + + - 因为计算机内部只认识1和100,所以浮点数强调的是小数的表现形式 + + - string(字符串,字符序列) + + ``` + str(x) + ``` + + - 在有些语言中,单个字符也是一个基本数据类型(char) + - 有序的 + - 如何表示字符串 + - “ ”(可以在命令行中换行) + - ’ ‘ + + - 转义字符 + + 告诉python解释器,我们当前要表示的是一个字符或者特殊字符 + + - 通过\来转义 + + ``` + "2\"" + "2\n" + ``` + + - boolean(布尔值) + + ``` + bool(2) + bool(0) + ``` + + 用来表示True或者false + + - True等价1 + + - false等价0 + + - bytes(二进制序列) + + 二进制的表示 + + None(空) + + - 有了false和0为什么还要none + + 因为false和0有时候也代表一种结果 + + + +## python的四大基本数据结构 + +- list(列表) + + 用来装载不同数据类型的数据结构 + + - 列表的特点 + + - 有序的 + - 可以装载任意数据类型 + - 可以更改的 + + - 如何表示list + + - 通过list()新建一个列表 + + ``` + list("hello") + ``` + + - 通过[]声明一个列表 + + ``` + a=[1,2,3] + ``` + +- tuple(元组) + + - 可以简单的认为元组就是不可修改的列表,常用来表示记录 + - 特点 + - 有序的 + - 可以装载任意数据类型 + - 不可更改 + + - 如何表示tuple + + - 通过tuple()新建一个元组 + + ``` + tuple("hello") + ``` + + - 通过(,)来声明一个元组(圆括号可以表示优先级) + + 声明单个元素的元组,要添加逗号 + + ``` + a=(1,) + ``` + +- dict(字典) + + - 字典也叫hashtable,通过hash(散列)函数传入的key值生成地址来查找value + + key->hash函数->返回value的地址->通过value地址返回value值 + + - 特点 + + - 无序 + + python3.6是有序的,无视这一点 + + - 字典中的key必须是可hash的,也就是不可更改的唯一的 + - 可以更改 + + - 表示字典 + + - 通过dict()来创建字典 + + ``` + dict(a=2) + ``` + + - 通过{}来声明一个字典 + + ``` + a={"a":2} + ``` + +- set(集合) + + - 什么是set + + set是没有value的字典 + + - 特点 + - 无序 + - 集合中的key必须是可hash的 + - 可以更改 + - 元素是唯一的 + + - 如何表示set + + - 通过set()来创建集合 + + ``` + set([1,2,3]) + ``` + + - 通过{1,2,3}来表示 + + # 课后作业 + + - 四大基本数据结构中哪些是可变的,哪些是不可变的? + + list,dict,set是可变的, tuple是不可变的。 + + - 四大基本数据结构中哪些是有序的,哪些是无序的 + + list,tuple是有序的,dict,set是无序的 + + - 创建set,list,dict,tuple实例,每个数据结构的实例需要包含六大基本类型 + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..3e7e40285629a685feb400a0def74d242d6fc70d Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232/\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/git1.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/git1.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..df7e4dec453a39647be558db9e43845dfc07f618 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/git1.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/git2.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/git2.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..da81338d08732b791de9aacea72b9c2c126e2384 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/git2.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/venv1.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/venv1.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..21c90c8b613faf609ecf313e0158bf96e1b94ab4 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/venv1.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/venv2.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/venv2.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..353c5e2fed2b686a03470cf17f3874bd1b894ab4 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\271\264\350\275\273\344\272\272\344\270\215\350\256\262\345\220\276\345\276\267/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\23212.14-12.20/\347\254\254\344\270\200\345\221\250\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232/venv2.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\200\350\212\202\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/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.md" deleted file mode 100644 index 8e61b4057230b9468e237b82ce59a797e42b21af..0000000000000000000000000000000000000000 --- "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.md" +++ /dev/null @@ -1,2 +0,0 @@ -![pycharm](https://images.gitee.com/uploads/images/2020/1216/102433_9cbce659_8433051.png "作业 (1).png") -![python](https://images.gitee.com/uploads/images/2020/1216/102443_b332b129_8433051.png "作业 (2).png") \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\344\275\234\344\270\232 12.20/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\344\275\234\344\270\232 12.20/.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/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\344\275\234\344\270\232 12.20/third homework.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\344\275\234\344\270\232 12.20/third homework.py" new file mode 100644 index 0000000000000000000000000000000000000000..a68eb3fd69ae262db2f571f984596b10acc72f74 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250 \347\254\254\344\270\211\350\212\202\344\275\234\344\270\232 12.20/third homework.py" @@ -0,0 +1,29 @@ +# 四大基本数据结构中 list 和 tuple是有序的, dict 和 set 是无序的 +# 四大数据结构, 除了 tuple不可更改,其余的都是可以更改的 + +age = 24 #整数 +money = 99.99 #浮点数 +T = bool(1) +F = bool(0) #布尔值 +er = bytes("so many money".encode("utf-8")) #二进制 +c = None + +list1 = ["I am", age, "years old, and I make", money, "money today.", er, "so I am very happy", T, c] +print(list1) + +tuple1 = ("I am", age, "years old, and I make", money, "money today.", er, "so I am very happy", T, c) +print(tuple1) + +set1 = {"I am", age, "years old, and I make", money, "money today.", er, "so I am very happy", T, c} +print(set1) + +dict1 = {"age": 24, "money": 99.99, "T": bool(1), + "er": bytes("so many money".encode("utf-8")), "c": None} +print(dict1) + +echo(list1) + + + + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 12.15/python \345\256\211\350\243\205.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 12.15/python \345\256\211\350\243\205.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..a701e2f923f7f127e6c39a207759a43be724be9d Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 12.15/python \345\256\211\350\243\205.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 12.15/\346\211\223\345\215\260\346\225\260\346\215\256.JPG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 12.15/\346\211\223\345\215\260\346\225\260\346\215\256.JPG" new file mode 100644 index 0000000000000000000000000000000000000000..28ca8f406b97f1d3c3a9c4400889286fb159fbb7 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 12.15/\346\211\223\345\215\260\346\225\260\346\215\256.JPG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/.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/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245.png" new file mode 100644 index 0000000000000000000000000000000000000000..614f0f9e471cf9ec64076f140e8f62b306e1c0e5 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\346\226\260\345\273\272\344\273\223\345\272\223.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\346\226\260\345\273\272\344\273\223\345\272\223.png" new file mode 100644 index 0000000000000000000000000000000000000000..353c37faac8b38bdaf845dfbff5f706d7170b927 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\346\226\260\345\273\272\344\273\223\345\272\223.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\346\226\260\351\241\271\347\233\256.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\346\226\260\351\241\271\347\233\256.png" new file mode 100644 index 0000000000000000000000000000000000000000..3fb0909d3f81e7b7cabe662a664e1c3b62286cac Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\346\226\260\351\241\271\347\233\256.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" new file mode 100644 index 0000000000000000000000000000000000000000..71fbf5455fd46e5549e1ae4b01ab1148e7cabef7 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14-12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202\344\275\234\344\270\232 12.18/\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\203.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232 12.21-12.27/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232 12.21-12.27/.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/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232 12.21-12.27/\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 \350\277\220\347\256\227\347\254\246/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232 12.21-12.27/\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 \350\277\220\347\256\227\347\254\246/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..94b4028f65b2db60529743a76d69e4c3e2f2e638 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232 12.21-12.27/\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 \350\277\220\347\256\227\347\254\246/.keep" @@ -0,0 +1,60 @@ +def bb(*args): + result = 1+1, 3-2, 2*2, 10/2, 10//3, 10 % 3, 8**(1/2) + return result + +result = bb(1+1, 3-2, 2*2, 10/2, 10//3, 10 % 3, 8**(1/2)) +print(result) + + +a = 10 +b = 21 +def plus(arg): #加法 + result = a+b + return result + +result =plus(a+b) +print(result) + +def minus(arg): #减法 + result = b-a + return result + +result = minus(b-a) +print(result) + +def asterisk(arg): #乘法 + result = a*b + return result + +result = asterisk(a*b) +print(result) + +def slash(arg): #除法 + result = b/a + return result + +result = slash(b/a) +print(result) + +def zhengchu(arg): #整除 + result = b//a + return result + +result = zhengchu(b//a) +print(result) + +def quyu(arg): #取余 + result = a % b + return result + +result = quyu(a % b) +print(result) + +def kaifang(arg): #开方 + result = a**(1/b) + return result + +result = kaifang(a**(1/b)) +print(result) + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232 12.21-12.27/\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 \350\277\220\347\256\227\347\254\246/my calculate.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232 12.21-12.27/\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 \350\277\220\347\256\227\347\254\246/my calculate.py" new file mode 100644 index 0000000000000000000000000000000000000000..13eec53d381dc5d5bd09a76a7acb6f4a1dae70d1 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\345\274\240\345\205\264\351\233\250/\347\254\254\344\272\214\345\221\250\344\275\234\344\270\232 12.21-12.27/\347\254\254\344\272\214\345\221\250 \347\254\254\344\270\200\350\212\202\344\275\234\344\270\232 \350\277\220\347\256\227\347\254\246/my calculate.py" @@ -0,0 +1,60 @@ +def bb(*args): + result = 1+1, 3-2, 2*2, 10/2, 10//3, 10 % 3, 8**(1/2) + return result + +result = bb(1+1, 3-2, 2*2, 10/2, 10//3, 10 % 3, 8**(1/2)) +print(result) + + +a = 10 +b = 21 +def plus(arg): #加法 + result = a+b + return result + +result =plus(a+b) +print(result) + +def minus(arg): #减法 + result = b-a + return result + +result = minus(b-a) +print(result) + +def asterisk(arg): #乘法 + result = a*b + return result + +result = asterisk(a*b) +print(result) + +def slash(arg): #除法 + result = b/a + return result + +result = slash(b/a) +print(result) + +def zhengchu(arg): #整除 + result = b//a + return result + +result = zhengchu(b//a) +print(result) + +def quyu(arg): #取余 + result = a % b + return result + +result = quyu(a % b) +print(result) + +def kaifang(arg): #开方 + result = a**(1/b) + return result + +result = kaifang(a**(1/b)) +print(result) + + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211/.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/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/1.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211/1.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/1.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211/1.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/2.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211/2.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/2.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211/2.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\357\274\21012.19\357\274\211/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\357\274\21012.19\357\274\211/.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/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\357\274\21012.19\357\274\211/main.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\357\274\21012.19\357\274\211/main.py" new file mode 100644 index 0000000000000000000000000000000000000000..5af4b94cd40708382d640b802cd267be5edf862b --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\357\274\21012.19\357\274\211/main.py" @@ -0,0 +1,15 @@ +a = 1 +b = 1.2 +c = "str" +d = True +e = b'123' +f = None + +aList = [a, b, c, d, e, f] # 列表有序,可更改 +aTuple = (a, b, c, d, e, f) # 元组有序,不可更改 +aDict = {"int": a, "float": b, "string": c, "boolean": d, "bytes": e, "None": f} # 字典无序,可更改 +aSet = {a, b, c, d, e, f} # 集合无序,可更改 +print(aList) +print(aTuple) +print(aDict) +print(aSet) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\357\274\21012.19\357\274\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\357\274\21012.19\357\274\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..fd21e37c984130ce5d3de3c4ef086123454d38c9 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\350\212\202_\344\275\234\344\270\232\357\274\21012.19\357\274\211/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" @@ -0,0 +1,237 @@ +## 第一周-第三节课-随堂笔记 + +## 变量和赋值 + +- 什么是变量 + + - 一个实体的指代 + + - 查看变量的内存地址 + + ``` + id(x) + ``` + + - 可重新赋值 + +- 为变量赋值 + + - 通过`=`来赋值 + + ``` + x = 3 + ``` + + - 被重新赋值之后的值去哪了? + + - 被系统回收了. + +- Python的常量 + + - python没有常量这个数据类型 + - 程序员之间的约定: 如果这个变量的命名都是大写字母, 那么就视为一个常量 + +## Python的六大基本类型 + +``` +*强调基本的原因数据类型和数据结构指向的范围更加广泛, 不要产生错误的认知, 形成思维定式 +``` + +- 通过`type()`函数来查看当前变量的数据类型 + +- `int` (整数) + + ``` + int('1') + ``` + +- `float`(浮点数) + + ``` + float('1.0') + float('INF') + ``` + + - 因为计算机内部只认识1和0, 所以浮点数强调的时小数的表现形式 + +- `string`(字符串, 字符序列) + + ``` + str(2) + ``` + + - 在有些语言中, 单个字符也是一个基本的数据类型(`Char`) + + - 有序的 + + - 如何表示字符串 + + - `''` + - `""` + - `''''''` + - `""""""` + + - 转义字符 + + 告诉python解释器, 我们当前要表示的是一个字符或者是特殊字符 + + - 通过`\`来转义 + + ``` + "2\"" + "2\n" + ``` + +- `boolean`(布尔值) + + ``` + bool(2) + bool(0) + ``` + + 用来表示`True`或者`False` + + - `True` 等价于1 + - `False`等价于0 + +- `bytes`(二进制序列) + + 二进制的表示形式 + +- `None`(空) + + - 有了`False`和`0` 为什么还要有`None` + + 因为`False`和`0`有时候也代表了一种结果 + +## Python的四大基本数据结构 + +- `list`(列表) + + - 什么是列表? + + 用来装载**不同数据类型**的数据集结构 + + - 列表的特点 + + - 有序的 + - 可以装载任意数据类型 + - 可以更改的 + + - 如何表示`list` + + - 通过`list()`新建一个列表 + + ``` + list("hello world") + ``` + + - 通过`[]`声明一个列表 + + ``` + a = [1, 2, 3] + ``` + +- `tuple`(元组) + + - 什么是元组? + + 可以简单地认为, 元组就是不可修改的列表, 常用来表示记录. + + - 元组的特点? + + - 有序的 + - 可以装载任意数据类型 + - 不可更改 + + - 如何表示`tuple` + + - 通过`tuple()`新建一个元组 + + ``` + tuple("hello") + ``` + + - 通过`(,)`来声明一个元组 + + ``` + a = (1, 2, 3) + + #声明单个元素的元组, 要添加逗号 + a = (1, ) + ``` + +- `dict`(字典) + + - 什么是字典? + + 字典也叫`hashtable`, 通过`hash`(散列)函数将传入的`key`值生成地址来查找`value` + + `key` -> `hash`函数 -> 返回了`value`的地址 -> 通过地址返回`value`值 + + - 字典的特点? + + - 无序的 + + `python3.6`是有序的, 无视这一点. + + - 字典中的`key`必须是可`hash`的, 也就是不可更改的, 唯一的 + + - 可以更改的 + + - 如何表示字典 + + - 通过`dict()`来创建字典 + + ``` + dict(a=2) + ``` + + - 通过`{}`来声明一个字典 + + ``` + a = {"a": 2} + ``` + +- `set`(集合) + + - 什么是`set` + + `set`其实是没有`value`的字典 + + - 集合的特点 + + - 无序的 + - 集合中的`key`必须是可`hash`的 + - 可以更改的 + - 元素是唯一的 + + - 如何表示`set` + + - 通过`set()`来创建集合 + + ``` + set([1,2,2]) + ``` + + - 通过`{}`来表示 + + ``` + {1, 2, 3} + ``` + +## 课后作业 + +- 四大基本数据结构中哪些是可变的, 哪些是不可变的? + + tuple不可变的。 + + list,dict,set 可变的。 + +- 四大基本数据结构中哪些是有序的, 哪些是无序的? + + list,tuple有序的 + + set,dict无序的 + +- 创建`set`, `list`, `dict`, `tuple`实例, 每个数据结构的实例需要包括六大基本类型. \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.17\357\274\211/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.17\357\274\211/.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/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.17\357\274\211/1.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.17\357\274\211/1.png" new file mode 100644 index 0000000000000000000000000000000000000000..53effc55ac5c34ebc05b2182fec7280ea1686ddf Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.17\357\274\211/1.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.17\357\274\211/2.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.17\357\274\211/2.png" new file mode 100644 index 0000000000000000000000000000000000000000..2a8ce5d131b7cce1968fb8bc1f7c60e3bd9659e7 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.17\357\274\211/2.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.22\357\274\211/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.22\357\274\211/.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/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.22\357\274\211/my_calculator.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.22\357\274\211/my_calculator.py" new file mode 100644 index 0000000000000000000000000000000000000000..b591da29beb6b2d2413bc23852e1f9e0ceeacd87 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\346\213\206\346\213\206\346\213\206/\347\254\254\344\272\214\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.22\357\274\211/my_calculator.py" @@ -0,0 +1,26 @@ +def add(a, b): + return a + b + + +def sub(a, b): + return a - b + + +def mul(a, b): + return a * b + + +def divide(a, b): + return a / b + + +def edivide(a, b): + return a // b + + +def getremainder(a, b): + return a % b + + +def sqrt(a, b): + return a ** (1/b) diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/.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/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/1\343\200\201\350\256\276\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/1\343\200\201\350\256\276\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..fb4132cfcff4a42b85853405c6f9479798e684e9 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/1\343\200\201\350\256\276\347\275\256\347\216\257\345\242\203\345\217\230\351\207\217.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/2\343\200\201python\345\256\211\350\243\205.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/2\343\200\201python\345\256\211\350\243\205.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..34fe5478b7faefa9c23dd7d569093a1ec57bacbd Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/2\343\200\201python\345\256\211\350\243\205.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/3\343\200\201phpstorm\346\211\223\345\215\260\346\225\260\346\215\256.PNG" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/3\343\200\201phpstorm\346\211\223\345\215\260\346\225\260\346\215\256.PNG" new file mode 100644 index 0000000000000000000000000000000000000000..88a62ec9093c29683c06d4877d7e6171c72b2f71 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/3\343\200\201phpstorm\346\211\223\345\215\260\346\225\260\346\215\256.PNG" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.pdf" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.pdf" new file mode 100644 index 0000000000000000000000000000000000000000..f641530c4b597f4144bd6ceb3e986365f0936731 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\346\254\241_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250\347\254\254\344\270\200\350\212\202\344\275\234\344\270\232.pdf" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232/.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/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.docx" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.docx" new file mode 100644 index 0000000000000000000000000000000000000000..d9a94767d7e1d589609a9c1d6f6915ae7f2af10e Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\211\346\254\241_\344\275\234\344\270\232/\347\254\254\344\270\200\345\221\250-\347\254\254\344\270\211\350\212\202\344\275\234\344\270\232.docx" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/5\347\217\255_\351\231\210\347\245\216\347\245\272/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\346\254\241_\344\275\234\344\270\232/.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/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/1.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211.assets/1\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/1.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211.assets/1\346\267\273\345\212\240\347\216\257\345\242\203\345\217\230\351\207\217.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/2.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211.assets/2python\345\256\211\350\243\205.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/2.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211.assets/2python\345\256\211\350\243\205.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/3.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211.assets/3phpstorm\346\211\223\345\215\260\346\225\260\346\215\256.png" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/3.png" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211.assets/3phpstorm\346\211\223\345\215\260\346\225\260\346\215\256.png" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211.assets/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\347\254\224\350\256\260\357\274\2101215\357\274\211.md" similarity index 100% rename from "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.assets/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202\357\274\2101215\357\274\211.md" rename to "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\344\275\234\344\270\232\357\274\21012.15\357\274\211.assets/\347\254\254\344\270\200\345\221\250_\347\254\254\344\270\200\350\212\202_\347\254\224\350\256\260\357\274\2101215\357\274\211.md" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/.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/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" new file mode 100644 index 0000000000000000000000000000000000000000..a1a93a471c2b32c7918214ae8658301a10206724 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2031.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" new file mode 100644 index 0000000000000000000000000000000000000000..4e8424f6831e89e23ccba9b35201262730e4fd58 Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\270\200\351\227\256 \346\226\260\345\273\272\351\241\271\347\233\256\345\271\266\351\205\215\347\275\256\350\231\232\346\213\237\347\216\257\345\242\2032.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" new file mode 100644 index 0000000000000000000000000000000000000000..5674f765880a5548d4f46ca25c75cbca9b311ffa Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 1.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" new file mode 100644 index 0000000000000000000000000000000000000000..93f50cd48513ab57a13404c9ac7f66fac191337d Binary files /dev/null and "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/5\347\217\255/\346\241\210\344\276\213\357\274\2325\347\217\255_\346\234\261\345\205\210\346\243\256/\347\254\254\344\270\200\345\221\250\344\275\234\344\270\232.12.14 - 12.20/\347\254\254\344\270\200\345\221\250_\347\254\254\344\272\214\350\212\202_\344\275\234\344\270\232\357\274\21012.18\357\274\211.assets/\347\254\254\344\272\214\351\227\256 \346\226\260\345\273\272GIT\344\273\223\345\272\223\345\271\266\345\220\214\346\255\245 2.png" differ diff --git "a/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/.keep" "b/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" "b/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..8d4c688f599f32965da104bdc4d5043955268278 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\200\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" @@ -0,0 +1,257 @@ +# 第二周-第一节课 + +## Python函数的基本介绍 + +- 什么是函数? + + 函数是一段可以直接被另外一段程序或代码引用的程序或代码, 也叫做子程序, 方法. + + - 可重复使用 + - 可互相调用 + +- 函数的目的 + + - 为了代码段的复用 + +- 在`Python`中如何定义一个函数? + + ``` + def foo(arg): + return "Hello " + str(arg) + ``` + +- 函数的组成 + + - 参数列表 + + - 必须参数 + + 当前参数必须**按顺序**传入 + + - 关键字参数 + + 根据关键字参数传参可以无视顺序 + + ``` + def foo(arg=None, arg_2=None) + ``` + + - 默认参数 + + ``` + def foo(arg='tunan', arg_2=None) + ``` + + - 不定长参数 + + ``` + 在装饰器中会大量应用 + ``` + + 可以接受任意长度的参数. + + - `*` + + 代表了省略, 省略了参数`tuple`(元组) + + - `**` + + 省略了关键字参数`dict`(字典) + + - 函数体 + + - 返回值 + + 默认返回`None` + + ``` + return None + ``` + +## Python的运算符 + +- 算术运算 + + - `+` + + - `-` + + - `*` + + 乘法 + + - `/` + + 除法 + + - `//` + + 整除 + + - `%` + + 取余数 + + - `**` + + x的y次幂 + + - 开方(没有提供直接的运算符) + + ``` + x ** (1/2) + ``` + + - abs() + + 取绝对值 + +- 赋值运算 + + 通过`=`赋值 + + ``` + a = 1 + ``` + +- 比较运算 + + 比较的是两个对象的字面值, 字面值暂时可以简单地理解为输出值 + + - `<` + + - `>` + + - `<=` + + - `>=` + + - `==` + + 等于 + + - `!=` + + 不等于 + +- 标识号比较运算 + + **比较的是两个变量的内存地址** + + - `is` + - `is not` + + - 赋值类型为`str`, `int`的时候要考虑`Python`常量池 + + ``` + a = "test_1" + b = "test_1" + + a is b + >>> True + + a = '你好' + b = '你好' + a is b + >>> False + ``` + +- 成员检测运算 + + 判断元素是否在当前序列当中 + + - `in` + + ``` + a = [1,2,3] + 1 in a + >>> True + + b = [1, 2] + b in a + >>> False + ``` + + - `not in` + + + +- 布尔运算 + + 判断当前语句的结果是`True`还是`False` + + - `and` + + 只有两边都是`True`才返回`True` + + - `or` + + 两边表达式有一个`True`返回的结果为`True` + + - 短路 + + ``` + 表达式A or 表达式B + 当表达式A为True时, 表达式B就不会运行 + ``` + + - 逻辑取反 + + `not` + +- 位运算 + + ``` + 二进制运算, 未来刷题的时候再说, 有兴趣的同学可以了解一下 + ``` + + - `~` + - `^` + - `>>` + - `<<` + - `&` + - `|` + + + +## Python运算符优先级 + +| 运算符 | 描述 | +| ---------------------------------- | ---------------------------------- | +| or | 布尔运算或 | +| and | 布尔运算与 | +| not | 布尔运算逻辑取反 | +| in, not in, is, is not, <, !=, ... | 比较运算, 成员检测运算, 标识号检测 | +| +, - | 加法和减法 | +| *, /, //, % | 乘法, 除法, 整除, 取余 | +| +x, -x | 正负数 | +| ** | 幂 | + +- 自定义优先级 + + ``` + 如果不确定优先级, 出于可读性和避免未知的BUG, 我们都应该用()来自定义优先级 + ``` + + - 通过`()` + + ``` + (not b and c) or (d and e) + ``` + + + +## 课后作业 + +- 用函数实现一个具有加, 减, 乘, 除, 整除, 取余, 开方的计算器 + + ``` + my_calculator.py + + def add(a, b): + ... + def sqrt(a, b): + ... + ``` + +- 在交互模式中练习`Python`运算符(不用提交) \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" "b/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..8360421a29ea1e7c3431913148c899efbe6427c1 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\270\211\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" @@ -0,0 +1,386 @@ +# 第二周-第三节课 + +## 了解变量和引用 + +- 变量简单地说就是指向了一个实体 + +- 引用简单地说就是指向变量的变量 + + ``` + >>> a = 1 + >>> b = a + >>> id(a) + 1778508560 + >>> id(b) + 1778508560 + ``` + +## 基础数据结构的CRUD操作 + +- List(列表) + + **list中存的元素是引用** + + - create(增加) + + - append + + 末尾添加元素 + + ``` + >>> l = [] + >>> id(l) + 55200584 + >>> l.append("a") + >>> l + ['a'] + >>> id(l) + 55200584 + ``` + + - `+` 和`+=` + + - `+` + + 拼接两个列表, 然后返回一个新列表 + + - `+=` + + ``` + >>> l = ['a'] + >>> id(l) + 55200664 + >>> l += ['b'] + >>> id(l) + 55200664 + >>> l + ['a', 'b'] + ``` + + - `*`和`*=` + + ``` + >>> a = 'a' + >>> id(a) + 53622432 + >>> l = [a] * 10 + >>> l + ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'] + >>> id(l[0]) + 53622432 + >>> id(l[1]) + 53622432 + >>> id(l[9]) + 53622432 + + # 赋值语句之后, a已经是一个新的对象了 + >>> a = 'b' + >>> l + ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'] + >>> id(a) + 53647264 + ``` + + - insert + + 指定位置添加元素 + + ``` + l.insert(0, 'b') + ``` + + - Retrieve(检索) + + - 索引取值 + + 所有序列都支持索引取值 + + - 切片 + + ``` + your_list[start:end:step] + # 取一段区间 + your_list[start:end] + + # 取最后一个值 + your_list[-1] + + # 间隔问题 + your_list[1:20:2] + ``` + + - index + + ``` + >>> l + ['a', 'b', 'c'] + >>> l.index('a') + 0 + ``` + + - Update(更新) + + - 索引赋值 + + ``` + l[0] = 'a_1' + ``` + + - 切片赋值 + + ``` + >>> l + ['a_1', 'a_2', 'b', 'c'] + >>> l[0:2] = "a" + >>> l + ['a', 'b', 'c'] + >>> l[0:2] = 1 + ``` + + - DELETE(删除) + + - pop() + + 从末尾删除元素并返回 + + ``` + >>> l + ['a', 'b', 'c'] + >>> x = l.pop() + >>> l + ['a', 'b'] + >>> x + 'c' + ``` + + - clear() + + 清楚当前列表的元素, 不会改变列表的内存地址. + + - ★SORT(排序) + + - sort() + + ``` + >>> l + [1, 3, 2, 6, 4] + >>> l.sort() + >>> l + [1, 2, 3, 4, 6] + + ``` + + - sorted + + 排序后返回新列表 + + ``` + >>> l2 = sorted(l) + >>> l + [1, 3, 2, 6, 4] + >>> l2 + [1, 2, 3, 4, 6] + >>> id(l) + 55201384 + >>> id(l2) + 55200984 + ``` + + - reverse + + ``` + >>> l2 + [1, 2, 3, 4, 6] + >>> l2.reverse() + >>> l2 + [6, 4, 3, 2, 1] + ``` + + - reversed + + 倒序之后返回新列表 + + ``` + >>> l + [1, 3, 2, 6, 4] + >>> list(reversed(l)) + [4, 6, 2, 3, 1] + ``` + +- tuple + + - Create + + 无 + + - Retrieve + + - 索引取值 + - index + - 切片 + + - Update + + 无 + + - Delete + + 无 + +- dict + + - Create + + - 键对值赋值 + + - update + + 提供合并字典的功能 + + ``` + >>> d + {'a': 1} + >>> d2 = {"b":2, "c": 3} + >>> d.update(d2) + >>> d + {'a': 1, 'b': 2, 'c': 3} + ``` + + - setdefault + + 如果字典中没有当前key, 那么就设置默认值 + + ``` + >>> d + {'a': 1, 'b': 2, 'c': 3} + >>> d.setdefault('b', 0) + 2 + >>> d.setdefault('d', 0) + 0 + >>> d + {'a': 1, 'b': 2, 'c': 3, 'd': 0} + + ``` + + - Retrieve + + - 键对值访问 + + - get + + 键对值访问缺失key会报错, 而get可以指定默认值 + + ``` + >>> d['e'] + Traceback (most recent call last): + File "", line 1, in + KeyError: 'e' + >>> d.get('f') + >>> d.get('f', 0) + 0 + ``` + + - keys() + + 返回所有key + + ``` + d.keys() + ``` + + - values() + + 返回所有value + + ``` + d.values() + ``` + + - items() + + 返回所有键对值 + + ``` + d.items() + ``` + + - Update + + - 键对值赋值 + + ``` + d['a'] = 100 + ``` + + - update + + ``` + >>> d.update({"b": 200, "c": 300}) + >>> d + {'a': 100, 'b': 200, 'c': 300, 'd': 0} + ``` + + - Delete + + - pop(key) + + 删除当前元素并返回value + + - popitem() + + 对于人来说, 相当于随机返回一个item + + - clear() + +- set + + - Create + + - add + - update + + - Retrieve + + - 运算符`in` + + ``` + >>> s + {'a'} + >>> "a" in s + True + + ``` + + - update + + - union + + 合并两个set, 并返回一个新的set + + - delete + + - remove 和discard + + discard缺失元素时不会报错, 而remove会报错 + + ``` + >>> s + {'b', 'c', 'a'} + >>> s.remove("a") + >>> s + {'b', 'c'} + >>> s.discard("e") + >>> s.remove("a") + Traceback (most recent call last): + File "", line 1, in + KeyError: 'a' + >>> + ``` + + - pop() + + 当成无序删除并返回元素 + +## 课后作业 + +- 完成四大基础数据结构的CRUD操作 \ No newline at end of file diff --git "a/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" "b/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..199fe8286de3676be2f25845d4b8740817e24651 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\351\232\217\345\240\202\347\254\224\350\256\260/\347\254\254\344\272\214\345\221\250-\345\255\227\347\254\246\344\270\262\345\222\214\346\225\260\346\215\256\347\273\223\346\236\204CRUD/\347\254\254\344\272\214\345\221\250-\347\254\254\344\272\214\350\212\202\350\257\276-\351\232\217\345\240\202\347\254\224\350\256\260.md" @@ -0,0 +1,12 @@ +# 第二周-第二节课 + +## 字符串(字符序列)和字节序列 + +## 字符串的CRUD操作 + +## 字符串的输出和输入 + +## 字符串的格式化输出 + +## 课后作业 +