随笔分类 - python
摘要:01 框架搭建 准备文件,确定文件名,保证能够在需要的位置编写代码 编写主运行循环,实现基本的用户输入和判断 1.1 文件准备 1cards_main.py保存主程序功能代码 程序入口 每一次启动名片管理系统都通过main这个文件启动 2新建cards_tools.py保存所有名片功能参数 将对名片
阅读全文
posted @ 2019-08-10 22:32
才华配得上梦想
摘要:程序的三大流程 顺序,分支,循环 循环-- 让特定代码 重复执行 while循环基本使用 1 # 打印5遍hello world 2 #print("hello world " * 5) 3 # 定义一个整数变量,记录循环次数 4 a = 0 5 while a < 5: 6 # 希望在循环内执行的
阅读全文
posted @ 2019-08-08 18:44
才华配得上梦想
摘要:比较 运算符 == != > < >= <= if else格式 if 要判断的条件: #if顶格写然后空一格,加: 条件成立,要做的事情 #缩进四个字节(tab键,建议用空格,不要混用) 1 #定义一个整数变量记录年龄 2 age = 19 3 #判断是否满了18岁 4 if age >= 18:
阅读全文
posted @ 2019-08-08 08:32
才华配得上梦想
摘要:syntax 语法 indentation 缩进 unexpected indent 出乎意料的缩进 declare 公布 interactive 交互式 python shell 交换式 退出解释器 exit() or 快捷键ctrl+d IPython interactive 交互式 自动补全
阅读全文
posted @ 2019-08-06 22:41
才华配得上梦想
摘要:# -*- coding:utf-8 -*-# Author:joycezhouimport os,sys,getpasscount = 0while count < 3: username = input("请输入用户名:") lock_file = open('account_lock.txt'
阅读全文
posted @ 2018-01-30 22:20
才华配得上梦想

浙公网安备 33010602011771号