diff --git "a/.idea/Python\345\237\272\347\241\200\350\257\276.iml" "b/.idea/Python\345\237\272\347\241\200\350\257\276.iml" index ce5947ee71a4b5fa160200d50f61ce32a325f14f..82957b8804640b9ad2fcd391f60c13bf8835ee14 100644 --- "a/.idea/Python\345\237\272\347\241\200\350\257\276.iml" +++ "b/.idea/Python\345\237\272\347\241\200\350\257\276.iml" @@ -4,7 +4,7 @@ - + diff --git a/.idea/dictionaries/ZH.xml b/.idea/dictionaries/ZH.xml new file mode 100644 index 0000000000000000000000000000000000000000..b8264b719e12e1176e2375dd9b9bcdc391375e53 --- /dev/null +++ b/.idea/dictionaries/ZH.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index cea2b38e00f74ca782b500ae4baa8a75a8c03f5f..4c6fed98cb1f2387d28fa25b6a3c5b80b48a8aff 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git "a/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/yangjinchao/Charpter3/Q1.py" "b/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/yangjinchao/Charpter3/Q1.py" index 518235af54537629a4dfe5fb718ddabe98c0bc10..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- "a/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/yangjinchao/Charpter3/Q1.py" +++ "b/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/yangjinchao/Charpter3/Q1.py" @@ -1,10 +0,0 @@ -'''1. 在Windows和Linux下创建一个Python_First.py的代码,计算 1 + - 2的结果,并且打印到屏幕上。 - 提示:需要把1+2的结果赋值到一个变量,例如:result。然后把字符串“计算结果为:”和result连接在一起,并打印。 - - 作业标准: - 1. 提供完整的代码(Windows或者Linux) - 2. 提供在Windows或Linux上类似于如下效果的截图 - ![](https://gitee.com/qytanggit/Python_Basic/raw/master/image/Charpter3/3.1.png)''' - -print(1+2) \ No newline at end of file diff --git "a/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/zhangheng/Charpter3/Q1-Python_First.py" "b/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/zhangheng/Charpter3/Q1-Python_First.py" new file mode 100644 index 0000000000000000000000000000000000000000..33e6b240c1462b1ce744a98b436fae8c938b927f --- /dev/null +++ "b/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/zhangheng/Charpter3/Q1-Python_First.py" @@ -0,0 +1,3 @@ +result = 1 + 2 + +print('计算 1 + 2 的结果为:' + str(result)) \ No newline at end of file diff --git "a/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/zhangheng/Charpter3/Q3-Radnom-IP.py" "b/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/zhangheng/Charpter3/Q3-Radnom-IP.py" new file mode 100644 index 0000000000000000000000000000000000000000..854a83249a8da709022d3120dc564a755e3d48c4 --- /dev/null +++ "b/\350\257\276\345\220\216\344\275\234\344\270\232/\347\254\254\344\270\200\345\244\251\344\275\234\344\270\232/zhangheng/Charpter3/Q3-Radnom-IP.py" @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +# -*- coding=utf-8 -*- +# 本脚由netmanalex编写 +# alex微信:18513895857 +# alex电话:18500783666 + +#导入随机数random模块 +import random + +#随机产生IP地址四个段落的数字 +section1=random.randint(1,255) +section2=random.randint(1,255) +section3=random.randint(1,255) +section4=random.randint(1,255) + +random_ip=str(section1)+'.'+str(section2)+'.'+str(section3)+'.'+str(section4) +print(random_ip) + + + +