计算机基础知识:
1. windows32位系统,使用最大内存是4G,64位系统使用128G
2.windows电脑应用调用过程显示读取硬盘数据,加载到内存,cpu每次从内存中取数据,断电内存存储数据会丢失
3. 二进制
4. 编码转换
案列:判断猜你所在级别:
#!/usr/bin/env python
#-*- coding:utf-8 -*-
#Authon:MansonCui
import sys
while True:
score = int(input("you score is:"))
if score > 100:
print ("输入值错误,重新输入:")
continue
elif score > 90:
print ("A")
sys.exit(0)
elif score > 80:
print ("B")
elif score > 70:
print ("C")
sys.exit(0)
elif score > 60:
print ("D")
sys.exit(0)
else:
print ("不及格")
================================================
案列二:判断年龄所在范围
#!/usr/bin/env python
#-*- coding:utf-8 -*-
#Author:Mansoncui
import sys
old_age = 50
while True:
age = int(input("You is age: "))
if age == old_age:
print ("Guessed it right")
sys.exit(0)
elif age > old_age:
print ("Guesse big .....")
else:
print ("Guessed small .....")