- 博客(31)
- 收藏
- 关注
原创 jeapedu 31 字符串切片删除子串
链接: https://pan.baidu.com/s/1o9Vr5SQ 密码: xf3r# 1 use slice to find substring pos# 2 separate string with blank space# 3 delete certain substring# 4 delete extra the, keep first on# s = "hello ...
2018-02-28 23:18:38 315
原创 jeapedu 30 字符串切片习题答案编码
链接: https://pan.baidu.com/s/1htBQU6S 密码: pzvj# separate string by blank spaces = "hello the cruel world"h = 0 # start pointv = 0 # end pointi = 0while i < len(s): if s[i] == " ": ...
2018-02-28 21:49:00 175
原创 jeapedu 29 字符串切片习题及答案
链接: https://pan.baidu.com/s/1qZ2Niby 密码: 18tws = "hjeallo jeapedu.com"# i = 8# 012345678sub = "jea"i = 0while i < len(s) - len(sub) + 1: #if s[i:i + len(sub)] == sub:...
2018-02-28 21:06:10 421
原创 jeapedu 28 字符串切片
链接: https://pan.baidu.com/s/1eTECOmA 密码: tu7e# 字符串是有序集合s = "hello the cruel world"# 012345678901234567890print(s[20], s[4])print(s[6], s[7], s[8])print(s[6] + s[7] + s[8])t = s[6] + s[7] + ...
2018-02-28 20:41:48 134
原创 jeapedu 27 字符串与两重循环习题2图解
链接: https://pan.baidu.com/s/1i5U55x7 密码: 3qat待补充dia图。
2018-02-28 20:40:26 92
原创 jeapedu 26 字符串与两重循环习题2答案
链接: https://pan.baidu.com/s/1smuD9Pb 密码: t8ir# 1 find sub string "jeap" and pos# 2 judge some string have any sub string# tips: double cycle# hello jeapedu.com jealop# jeap# 3 extract website#...
2018-02-28 18:38:10 315
原创 jeapedu 25 字符串两重循环习题2
链接: https://pan.baidu.com/s/1qZIwnz2 密码: n3fcs = "hello jeapedkddu.com"head = "je"tail = "du"ph = 0pt = 0i = 0while i < len(s) - len(head) + 1: # <=, 20-2=18, 0~19 -> 0~18 j = 0 ...
2018-02-28 17:13:29 135
原创 jeapedu 24 字符串与两重循环习题答案
链接: https://pan.baidu.com/s/1eTdzdB0 密码: snrns = "hjeallo jeapedu.com" * 3# i isub = "jeap"i = 0while i <= len(s) - len(sub): j = 0 c = 0 while j < len(sub): i...
2018-02-28 13:17:05 134
原创 jeapedu 23 字符串与两重循环
链接: https://pan.baidu.com/s/1mjpydjM 密码: n545s = "hjeallo jeapedu.com"# 01234567890123456# index left -> left 0 1 ... len(s)-1# out of range#print(s[6], s[7], s[8], s[9], s[len(s)-1])i...
2018-02-27 22:02:10 93
原创 jeapedu 22 字符串ord函数
链接: https://pan.baidu.com/s/1nwFe2ff 密码: dkhxprint(ord("a"))print(ord("A"))# "hello world" to asciis = "hello world"i = 0while i < len(s): print(s[i], ord(s[i])) i += 1
2018-02-27 20:47:37 118
原创 jeapedu 21 字符串chr函数
链接: https://pan.baidu.com/s/1ggQLYhH 密码: i7st# 3 random.randint(100000,999999) # 1) if 4 and 7 in it# 2) if 4 and 7 not in it, whether 6 and 8 in it# 3) print 4 and 7 posimport randomi ...
2018-02-27 15:53:19 186
原创 jeapedu 20 字符串习题答案
链接: https://pan.baidu.com/s/1i6OadqH 密码: ma9y# 1 print jeapedu001~jeapedu100#jeapedu000#jeapedu001#jeapedu009#...#jeapedu010#jeapedu011#jeapedu099#...#jeapedu100# if elif elsei = 0while ...
2018-02-27 15:20:42 569
原创 jeapedu 19 字符串算术运算习题答案
链接: https://pan.baidu.com/s/1eUlMJSI 密码: dk43# 1 print jeapedu000~jeapedu100# 2 count "c" in "aacacaac" * 100 count and pos# 3 random.randint(100000,999999) # 1) if 4 and 7 in it, otherwise dro...
2018-02-27 15:04:39 189
原创 jeapedu 18 字符串索引遍历
链接: https://pan.baidu.com/s/1nwfS9LZ 密码: h7c3# index, slices = "abcdefghijklmnopqrstuvwxyz"# 01234567890123456789012345print(s)print(s[6], s[14], s[3])print(s[6] + s[14] + s[3])print(s[0])...
2018-02-27 12:54:45 147
原创 jeapedu 17 字符串基本运算
链接: https://pan.baidu.com/s/1ramOq88 密码: f6x4# 关系 == > < * in s0 = "aac"s1 = "aaaa"# 按位比较if s0 > s1: print("true")else: print("false")s0 = "cccaac"s1 = "aa"
2018-02-27 12:44:02 106
原创 jeapedu 16 字符串基础
链接: https://pan.baidu.com/s/1nwLketr 密码: gatus0 = "hello"s1 = 'jeapedu\n.edu's2 = """.com"""s3 = '''www.'''s4 = '''hellojeapedu'''print(s0)print(s1)print(s2)print(s3)print(s4)s0 = "aaaa"...
2018-02-27 12:37:11 123
原创 jeapedu 15 两重循环习题3
链接: https://pan.baidu.com/s/1eUar0um 密码: vkqi## ## ## # # #i = 1while i < 10: j = 1 while j < 10: if i < 9: if j == 1 or j == i: print("*"...
2018-02-27 11:33:44 205
原创 jeapedu 14 两重循环习题2
链接: https://pan.baidu.com/s/1du2h5s 密码: 4xpr## 14 两重循环习题2i = 100while i < 1000: #print(i, end=' ') b = i // 100 #print(b, end=' ') s = (i - b * 100) // 10 g = i % 10 #pr...
2018-02-26 23:58:20 212
原创 jeapedu 13 两重循环习题1
链接: https://pan.baidu.com/s/1mkche9y 密码: cbyb## 13 两重循环习题1#下三角j = 1 # j 代表行号, i代表列号while j < 10: i = 1 print(j, "->", end=' ') while i < 10: if j >= i: ...
2018-02-26 23:37:29 141
原创 jeapedu 12 两重循环
链接: https://pan.baidu.com/s/1ht3dv84 密码: xh7kprint("a")i = 1while i < 10: print(1 * i, end=' ') i += 1print("")i = 1while i < 10: print(2 * i, end=' ') i += 1print("")...
2018-02-26 23:25:42 151
原创 jeapedu 11 while语句习题3
链接: https://pan.baidu.com/s/1jJoMh2Q 密码: u8qj# 7print("7-----------")print(1 * 1)print(2 * 2)print(3 * 3)print(9 * 9)i = 1while i <= 9: print(i * i, end=' ') i = i + 1print("8---...
2018-02-26 22:20:41 157
原创 jeapedu 10 while语句习题2
链接: https://pan.baidu.com/s/1o9bMLjc 密码: w5q9 本集视频少部分缺失,因有input函数,需在idle运行。# 10 num guess game#include <stdio.h>import mathimport random#from math import * # 可以这样引入而不加前缀x = 16.0y = math...
2018-02-26 20:49:18 193
原创 jeapedu 9 while语句习题
链接: https://pan.baidu.com/s/1bq1R9td 密码: 3cer# 0print("0-----------")print(2)print(3)print(4)print(101)i = 2while i <= 101: print(i) i = i + 1# 1print("1-----------")print(1)p...
2018-02-26 19:21:28 207
原创 jeapedu 8 while语句
链接: https://pan.baidu.com/s/1eSTV6ue 密码: 4khuprint(1)print(2)print(3)print(4)print(5)print(6)print(7)print("hello world")# loop'''initialwhile cond: statements modify'''i = 1wh...
2018-02-26 17:09:44 107
原创 jeapedu 7 多分支语句
链接: https://pan.baidu.com/s/1oAggJ1o 密码: ir2jrecord = 85if record >= 90: print("a")elif record >= 80: print("b")elif record >= 70: print("c")elif record >= 60: print(...
2018-02-26 16:48:11 104
原创 jeapedu 6 分支语句嵌套习题答案
链接: https://pan.baidu.com/s/1edhyiE 密码: iwirrecord = 83if record >= 60: if record >= 70: if record >= 80: if record >= 90: print("A") ...
2018-02-26 16:23:30 157
原创 jeapedu 5 分支语句嵌套习题
链接: https://pan.baidu.com/s/1mkeiUlM 密码: 6mrbrecord = 83if record >= 60: if record >= 70: if record >= 80: if record >= 90: print("A") ...
2018-02-26 16:17:05 172
原创 jeapedu 4 分支语句嵌套
链接: https://pan.baidu.com/s/1sm30U9R 密码: jt4rs = "M"a = 12if s != "F": if a >= 18: print("Gentlemen") else: print("Boy")else: if a >= 18: print("Lady"
2018-02-26 15:51:29 125
原创 jeapedu 3 分支语句与逻辑关系表达式
链接: https://pan.baidu.com/s/1eTl60IQ 密码: 2gq7s = "F"#age = 12c = "r"if s != "M" and c == "r": i = i + 100 print("r Gentlemen")else: print("Lady")print("end")rec = 8
2018-02-26 13:43:21 447
原创 jeapedu 2 分支语句if基础
链接: https://pan.baidu.com/s/1jJ6wZQI 密码: j2wq# python if_conditionprint(1)print(2)print(3)print(4)print(5)print(6)print(7)s = "M"#s = "F"if s == "M": # != >= <= i = i + 10 p...
2018-02-26 13:18:57 198
原创 jeapedu 1 python简介
以python3重写教学代码。 链接:https://pan.baidu.com/s/1c4bbz9Y 密码:841t# number how store?# unsigned int i = 0xa;# unsigned int i = -2;# 16 hex format 0-9 a-f# data input # assign, input_function#...
2018-02-26 13:07:37 156
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人