![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
钱德勒宾
玫瑰吸收光芒,大地按捺清香。
展开
-
Python:一个四行四列的小网格绘制的程序
在看Think Python 第三章 函数章节时,有个练习是:写一个四行四列的小网格绘制的程序。官方例程为:http://thinkpython2.com/code/grid.py上面例程中的代码为:"""This module contains a code example related toThink Python, 2nd Editionby Allen Downeyhtt...原创 2020-01-03 19:27:57 · 2164 阅读 · 0 评论 -
Python:简单程序记录(二)
Python 阶乘实例代码:#!/usr/bin/python3#导入参数模块from sys import argvscripts, num = argv#判断输入的是否是数字if not num.isdigit(): exit("Please Input Number !") #转换为int型num = int(num) #输入要大于一if(num < ...原创 2019-12-26 23:44:43 · 178 阅读 · 0 评论 -
Python:判断输入的是否是数字
参考链接:https://www.cnblogs.com/zxmbky/p/9160822.html代码:#!/usr/bin/python3num1 = input("first num :").strip()num2 = input("second num: ").strip()if not num1.replace(".",'').isdigit(): exit(...原创 2019-12-14 15:16:57 · 2412 阅读 · 0 评论 -
Python:简单程序记录
题目来自菜鸟教程:Python3 实例原创 2019-12-15 14:11:10 · 154 阅读 · 0 评论