摘要: 1 # 用户登录(三次机会重试) 2 i =0 3 4 while i < 3: 5 user = raw_input("username:") 6 pwd = raw_input("password:") 7 if user == "alex" and pwd == "123": 8 print( 阅读全文
posted @ 2020-05-10 10:38 haven_rui 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 1 # 求1-2+3-4+5.....99的所有数的和(含等式) 2 s = "" 3 4 sum = 0 5 start = 1 6 7 while start < 100: 8 temp = start % 2 9 if temp == 1: 10 if start == 1: 11 s = s 阅读全文
posted @ 2020-05-10 10:09 haven_rui 阅读(242) 评论(0) 推荐(0) 编辑
摘要: # 求1-2+3-4+5.....99的所有数的和(含等式)s = "" sum = 0start = 1 while start < 100: temp = start % 2 if temp == 1: if start == 1: s = str(start) else: s = s + "+ 阅读全文
posted @ 2020-05-10 10:07 haven_rui 阅读(682) 评论(0) 推荐(0) 编辑
摘要: # 输出 1-100 的奇数 start = 1 while start <= 100: temp = start % 2 if temp == 1: print(start) else: pass start += 1 # 输出1-100 偶数 start = 1 while start <= 1 阅读全文
posted @ 2020-05-10 09:34 haven_rui 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 1 案例一: 2 ks = 1 3 while True: 4 print(ks) 5 if ks == 10: 6 break 7 ks = ks + 1 8 print("end") 9 10 11 12 案例二: 13 while True: 14 print('123') 15 break 阅读全文
posted @ 2020-05-09 23:33 haven_rui 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #一个等号是赋值 #两等号是比较 #!=表示不等于 #!=表示不等于 if 1 == 1: print("111111") else: print("22222") inp = raw_input("<<<<<") if inp == "test1": print("超级管理员") elif inp 阅读全文
posted @ 2020-05-09 23:30 haven_rui 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python 如果想要类似于执行shell脚本一样执行Python脚本,例:./test.py,那么需要在test.py文件头部指定解释器(路径和注释中不能包含汉字)。 2 # -*- coding:utf-8 -*- 3 print("Hello world") 阅读全文
posted @ 2020-05-09 23:27 haven_rui 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python #指定解释器 2 # -*- coding:utf-8 -*- # 默认字符集 3 print("Hello world") 阅读全文
posted @ 2020-05-09 23:20 haven_rui 阅读(114) 评论(0) 推荐(0) 编辑
摘要: -- Created on 2020/4/22 by EX_CHENHAINING declare P_IN_INST_ID NUMBER :=1; P_IN_START_DATE VARCHAR2(20):='20180101'; P_IN_END_DATE VARCHAR(20):='20200 阅读全文
posted @ 2020-05-06 10:26 haven_rui 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Drop database link PARTY_LINK -- Create database link create database link PARTY_LINK connect to user identified by pswd using 'test' 阅读全文
posted @ 2020-04-28 10:46 haven_rui 阅读(231) 评论(0) 推荐(0) 编辑