2021-2022-1 20211414 《信息安全专业导论》第五周学习总结
作业信息
[2021-2022-1信息安全专业导论](https://edu.cnblogs.com/campus/besti/2021-2022-1fois)
[2021-2022-1信息安全专业导论第五周作业](https://www.cnblogs.com/rocedu/p/9577842.html#WEEK05)
教材学习内容总结
1阅读《计算机科学概论》第六章(低级程序设计语言与伪代码),了解了机器语言、Pep/8等内容,能够用机器语言编写简单的程序,了解了伪代码的概念和功能等。
2阅读《看漫画学Python》第五章(程序流程控制),了解了分支语句(if、else、elif),循环语句(while、for)和跳转语句(break、continue)等,并知道了其使用语法。
教材学习中的问题和解决过程
问题:不理解立即寻址模式与直接寻址模式的区别
解决方法:到博客园查找相关资料明白直接寻址模式包含将要处理的数据的地址。且两者载入内存为之的字节数也不相等。
代码调试过程中的问题和解决过程
if score >=90:
grade = 'A'
elif score >=80:
grade = 'B'
elif score >=70:
grade = 'C'
elif score >=60:
grade = 'D'
这一段代码之前没有后加冒号导致运行不了
解决:比照书上代码改正
代码托管
coding=utf-8
5.1.1.py
score = int(input("请随机输入一个0~9的整数,我们将会猜出你心里想的是什么:"))
if score >= 85:
print("你可太优秀了")
if score < 60:
print("
if (score >= 60) and (score < 85):
print("还行吧")
coding=utf-8
5.1.3.py
score = int(input("请输入一个0~100的整数:"))
if score >=90:
grade = 'A'
elif score >=80:
grade = 'B'
elif score >=70:
grade = 'C'
elif score >=60:
grade = 'D'
else:
grade = 'F'
print("Grade = "+grade)
coding=utf-8
5.2.1.1.py
i=0
while i*i <1000:
i +=1
print("i =" + str(i))
print("i * i=" + str(i * i))
coding=utf-8
5.2.3.1.py
for item in range(10):
if item ==3:
break
print(item)
else:
print('For Over!')
coding=utf-8
5.2.3.py
print("----字符串-------")
for item in 'hello':
print(item)
声明整数列表
numbers = [43,32,55,74]
print("----整数列表-------")
for item in numbers:
print(item)
coding=utf-8
5.3.1.py
for item in range(10):
if item ==3:
continue
print(item)
coding=utf-8
水仙花
i=100;r=0;s=0;t=0
while i < 1000:
r=i//100
s=(i-r100)//10
t=i-r100-s*10
if i==(r3+s3+t**3):
print("i="+str(i))
i += 1
上周考试错题总结:
The value of each position in a number system is determined by subtracting the base from the position number.
数字系统中每个位置的值是通过从位置编号中减去基数来确定的。
本题错误,并不是通过减去基数确定。
学习进度条
代码行数(新增/累积) | 博客量(新增/累积) | 学习时间(新增/累积) | 重要成长 | |
---|---|---|---|---|
目标 | 5000行 | 30篇 | 400小时 | |
第一周 | 200/200 | 2/2 | 20/20 | |
第二周 | 300/500 | 2/4 | 18/38 | |
第三周 | 500/1000 | 3/7 | 22/60 | |
第四周 | 300/1300 | 2/9 | 30/90 |