python(1-3)
計算機基礎知識:
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 .....")
python(1-3)