powershell:
cd a
python ex3
notepad++
#count chickens
print "I will now count my chickens:"#hens' sums
print "hens",25+30/6
#roosters' sums
print "roosters",100-25*3%4
#count eggs
print "Now I will count the eggs:"
#eggs' sum
print 3+2+1-5+4%2-1/4+6
#input numbers
print "Is it true that 3+2<5-7?"
#output answer
print 3 + 2 < 5 - 7
#count 3+2
print "what is 3 + 2?",3 + 2
#count 5-7
print "what is 5 - 7?",5 - 7
print "oh,that's why it's False."
print "how about some more."
print "Is it greater?",5 > -2
print "Is it greater or equal?",5 >= -2
print "Is it less or equal?",5 <= -2
print "7/4="
print 7/4
print "7.0/4.0="
print 7.0/4.0
浮点数是一个很关键的概念,暂时可以理解为一个附带精度的数。
%是模除 类似于取整