第一种:利用str()函数将数字转化成字符串,再利用len()函数判断位长. a=Int(raw_input("the number you want type in:") b=len(str(a)) print b 第二种:利用除10取商,通过循环次数判断位数. c=0 a=int(raw_input("the number you want type in:")) while a!=0: a=a/10 c +=1 print c
实验要求: Objective: To further understand the well-known algorithm Fast Fourier Transform (FFT) and verify its effectiveness to calculate the discrete Fourier transform (DFT). Main requirements: Ability of programming with C, C++, or Matlab. Instruction