Use the idle to play the multiplication table, want to be like the result:
The implementation algorithm is simple, but the idle (python3.7) default line-wrapping output is not easy to implement, it takes a lot of brains.
The code is as follows:
The *row=0, the 1, the 1th row, is the value of the time.???????????
While True:
? ? Print ("\ n")???????????? #为特殊输出格式设的换行语句
? ? N=0, 1 is the value of 1x=y.??????????
? ? Row=row+1?????????
? ? If row==10:????????????? #row最高设到9
? ? ? ? Break
? ? While N<row:???????????? #控制输出个数, the first few lines output a few data
? ? ? ? N=n+1
? ? ? ? C=n? Row
? ? ? ? D=STR (n) + "X" +str (row) + "=" +str (c) #编花
? ? ? ? Print (d+ "?) ", end= ')??????? #输出内容, end=", special statement, do not allow default line wrapping *
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Post-run effects
Honey See, say this 8,864, 8,972 of I also will ah. I said but I just use these lines of code to achieve this, and you can only say 9,981, and I am here 1000, even to 10,000 of the multiplication can have, and I just need to move a few fingers, finish me? If row==10:10 change to 1000, run, see Fullscreen's determinant constantly rolling
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? .....
I said, look, this is called technology, automation ... Honey: No talking.
Python 99 multiplication table