YouTip LogoYouTip

Python3 99 Table

# Python3.x Python Multiplication Table [![Image 3: Document Object Reference](#) Python3 Examples](#) The following example demonstrates how to implement a multiplication table: ## Example # -*- coding: UTF-8 -*-# Filename : test.py# author by : www..com# Multiplication Table for i in range(1, 10): for j in range(1, i+1): print('{}x{}={}t'.format(j, i, i*j), end='')print() Executing the above code produces the following output: 1x1=11x2=22x2=41x3=32x3=63x3=91x4=42x4=83x4=124x4=161x5=52x5=103x5=154x5=205x5=251x6=62x6=123x6=184x6=245x6=306x6=361x7=72x7=143x7=214x7=285x7=356x7=427x7=491x8=82x8=163x8=244x8=325x8=406x8=487x8=568x8=641x9=92x9=183x9=274x9=365x9=456x9=547x9=638x9=729x9=81 By specifying the value of the `end` parameter, you can cancel the carriage return at the end of the output, achieving a non-newline effect. [![Image 4: Document Object Reference](#) Python3 Examples](#)
← Python3 Area TrianglePython3 Square Root β†’