Python小练习

1、计算x的n次方

2、计算x的阶乘

3、计算1x1 + 2x2 + 3x3 ...+ NxN之和

def fun(n):
    s=0
    while n > 0:
        s = s + n*n
        n = n -1
    return s

4、打印九九乘法表

原文地址:https://www.cnblogs.com/windyrainy/p/10608156.html