Python's multiplication tables

Source: Internet
Author: User

python's multiplication tables
Python's multiplication tables
    用python来写一个脚本,使得这个脚本在运行后自动输出乘法口诀表。    pyton的脚本如下:
# !/usr/bin/env python #coding: Utf-8 "" "File:chengfa.pydate: 2017-08-24author:lijiandesc: "" "for i in range (1,10): for J in range (1,i+1): print  "{} x {} = {}\t". Format (j,i,j*i), print              
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    运行后可以输出乘法口诀表,输出图如下所示。

Python's multiplication tables

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.