第一个函数名为f2,参数为x,该函数能够将1到x之间所有能被2整除的输出。
def f2(x): for i in range(1,x+1): if i%2==0: print(i,end=' ') f2(int(input('输入一个数x:')))