
上QQ阅读APP看书,第一时间看更新
1.4 尝试点儿新的东西
尝试点儿新的东西,在IDLE中输入print(5+3)或者直接输入5+3:

看起来Python还会做加法!这并不奇怪,因为计算机最开始的时候就是用来计算的,任何编程语言都具备计算能力,那接下来看看Python在计算方面有何神奇。
不妨再试试计算1234567890987654321 * 9876543210123456789:

怎么样?如果C语言实现起来费劲,要九曲十八弯地利用数组做大数运算,在这里Python轻而易举就完成了!
还有呢,大家试试输入print("Well water"+"River"):

可以看到,井水和河水又友好地在一起生活了,祝它们幸福吧!