先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新软件测试全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上软件测试知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
如果你需要这些资料,可以添加V获取:vip1024b (备注软件测试)
正文
print(‘你输了’)
break
import random
choices = [‘拳头’,‘剪刀’,‘布’]
#print(choices)
computer = random.choice(choices)
#print(computer)
while True:
player = input('请出拳: ')
print(“mychoice:%s computer’s choice:%s” % (player , computer))
if player == computer:
print('相同结果,请重新出拳: ')
continue
elif player == ‘拳头’ and computer == ‘剪刀’ :
print(‘你赢了’)
break
elif player == ‘布’ and computer == ‘拳头’ :
print(‘你赢了’)
break
elif player == ‘剪刀’ and computer == ‘布’ :
print(‘你赢了’)
break
else:
print(‘你输了’)
break
import random
choices = [‘拳头’,‘剪刀’,‘布’]
#print(choices)
win_list = [[‘拳头’,‘剪刀’],[‘剪刀’,‘布’],[‘布’,‘拳头’]]
inn = “”“(0)拳头
(1)剪刀
(2)布
请选择(0/1/2): “””
while True:
computer = random.choice(choices)
print(computer)
ind = int(input(inn))
player = choices[ind]
print(“mychoice:%s computer’s choice:%s” % (player , computer))
if player == computer:
print(‘\033[032;1m相同结果,请重新出拳:\033[0m’)
continue
elif [player,computer] in win_list:
print(‘\033[31;1m你赢了\033[0m’)
break
else:
print(‘\033[31;1m你输了\033[0m’)
break
循环:
break:
- 用于结束循环
#累加1+2+3+…+100
result = 0
counter = 1
while counter < 101:
result += counter
counter += 1
print(result)
#三盘两胜局:
import random
choices = [‘拳头’,‘剪刀’,‘布’]
#print(choices)
win_list = [[‘拳头’,‘剪刀’],[‘剪刀’,‘布’],[‘布’,‘拳头’]]
inn = “”"(0)拳头
(1)剪刀
(2)布
请选择(0/1/2): “”"
count = 0
count2 = 0
while count < 2 and count2 < 2:
# computer = random.choice(choices)
# # print(computer)
# ind = int(input(inn))
# player = choices[ind]
# print(“mychoice:%s computer’s choice:%s” % (player , computer))
# if player == computer:
# print(‘\033[032;1m相同结果,请重新出拳:\033[0m’)
# continue
# elif [player,computer] in win_list:
# #print(‘\033[31;1m你赢了\033[0m’)
# count += 1
# print(‘赢了%s次’ % count)
# else:
# #print(‘\033[31;1m你输了\033[0m’)
# count2 += 1
# print(‘赢了%s次’ % count2)
#
if count == 2 :
# print(“你赢了”)
else:
# print(“你输了”)
while count < 2 and count2 < 2:
# computer = random.choice(choices)
# # print(computer)
# ind = int(input(inn))
# player = choices[ind]
# print(“mychoice:%s computer’s choice:%s” % (player , computer))
# if player == computer:
# print(‘\033[032;1m相同结果,请重新出拳:\033[0m’)
# continue
# elif [player,computer] in win_list:
# #print(‘\033[31;1m你赢了\033[0m’)
# count += 1
# print(‘赢了%s次’ % count)
# else:
# #print(‘\033[31;1m你输了\033[0m’)
# count2 += 1
# print(‘赢了%s次’ % count2)
#
if count == 2 :
# print(“你赢了”)
else:
# print(“你输了”)
#方法二:
while 1:
# computer = random.choice(choices)
# # print(computer)
# ind = int(input(inn))
# player = choices[ind]
# print(“mychoice:%s computer’s choice:%s” % (player , computer))
# if player == computer:
# print(‘\033[032;1m相同结果,请重新出拳:\033[0m’)
# continue
# elif [player,computer] in win_list:
# #print(‘\033[31;1m你赢了\033[0m’)
# count += 1
# print(‘赢了%s次’ % count)
# else:
# #print(‘\033[31;1m你输了\033[0m’)
# count2 += 1
# print(‘赢了%s次’ % count2)
# if count == 2 or count2 == 2 :
# break
continue:
#1-100的偶数累加
result = 0
counter = 0
while counter < 100:
# counter += 1
# if counter % 2 == 1:
# if counter % 2 : 1为真 0为假
# continue
# else:(可有可无)
# result += counter
print(result)
else:
import random
num2 = random.choice(range(1,101))
count = 0
while count<7:
count += 1
num = int(input("请输入一个数字: "))
if num > num2:
print(‘大了’)
elif num < num2:
print(‘小了’)
elif num == num2:
print(“中”)
break
else:
print(‘不要输入除了1-100之外的数字或者符号哦’)
else:
print(“正确答案是:%s 你猜了%s次,你个辣鸡,别猜了” % (num2,count))
for:
astr = ‘hello’
alist = [10, 20, 30]
atuple = (‘yyf’, ‘chao’, ‘yang’)
adict = {‘name’:‘yyf’ , ‘age’:23}
for ch in astr:
print(ch)
for i in alist:
print(i)
for name in atuple:
print(name)
for key in adict:
print(‘%s:%s’ % (key,adict[key]))
测试结果:
/root/nsd1907/bin/python /root/nsd1907/py02/day02/01.py
h
e
l
l
o
10
20
30
yyf
chao
yang
name:yyf
age:23
在终端用for循环的时候,也需要缩进
a = ‘wode’
for i in a:
… print(i)
…
w
o
d
e
range用法:
range(10)
range(0, 10)
list(range(10))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
range(6,10)
range(6, 10)
list(range(6,10))
[6, 7, 8, 9]
list(range(6,10,2))
[6, 8]
list(range(1,10,2))
[1, 3, 5, 7, 9]
list(range(10,1,-1))
[10, 9, 8, 7, 6, 5, 4, 3, 2]
list(range(10,1))
[]
list(range(10,1,-1))
[10, 9, 8, 7, 6, 5, 4, 3, 2]
sum100 =0
for i in range(1,101):
# sum100 += i
print(sum100)
列表实现斐波那契数列:
num = int(input('输入一个数字: '))
fib = [0, 1]
for i in range(num):
# fib.append(fib[-1] + fib[-2])
print(fib)
九九乘法:—for循环的嵌套使用
for i in range(1,4):#控制第几行的打印
#每行之内再循环打印3个hello
for j in range(1,4): #行内重复打印3个hello
print(‘hello’,end=’ ') #print默认在结尾打印回车,改为空格
print() #每行结尾打印回车
for i in range(1,10):#控制第几行的打印
#每行之内再循环打印3个hello
for j in range(1,i+1): #行内重复打印3个hello
print(‘*’,end=’ ') #print默认在结尾打印回车,改为空格
print() #每行结尾打印回车
n = int(input('number: '))
for i in range(1, n + 1):
for j in range(1, i + 1):
print(‘%s*%s=%s’ % (j, i, i * j), end=’ ')
print()
列表解析:
[5]
[5]
[5+5] ----将表达式的计算结果放到列表中
[10]
[5+5 for i in range(10)] —通过for循环控制表达式计算的次数
[10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
[5+i for i in range(10)] ----再表达式中,使用for中的变量
[5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
[5+i for i in range(1,11)] ------
[6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注软件测试)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
的变量
[5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
[5+i for i in range(1,11)] ------
[6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注软件测试)
[外链图片转存中…(img-z3GMpJYt-1713438147119)]
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!