Home > Backend Development > Python Tutorial > How to output the multiplication table in python

How to output the multiplication table in python

王林
Release: 2020-05-09 14:01:13
Original
8072 people have browsed it

How to output the multiplication table in python

Implementation code:

# 九九乘法表
for i in range(1, 10):
    for j in range(1, i+1):
            print('{}x{}={}\t'.format(j, i, i*j), end='')
    print()
Copy after login

The output results are as follows:

How to output the multiplication table in python

Recommended tutorial: python tutorial

The above is the detailed content of How to output the multiplication table in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template