#!/usr/bin/env sh for ((x=1;x<10;x++));do for ((y=1;x>=y;y++));do printf "${y}x${x}=$(expr ${x} \* ${y}) " done echo -e "\n" done ...
分类:
系统相关 时间:
2020-06-25 23:25:07
阅读次数:
86
1.python优点简单易学,开元免费,解释性语言,面向对象,功能强大,可扩展性,可移植性 2.变量的类型数字,布尔类型,字符串,列表,元祖,字典 3.标识符命名规则1.标识符由字母、下划线和数字组成,且不能以数字开头。2.Python中的标识符是区分大小写的3.Python中的标识符不能使用关键字 ...
分类:
编程语言 时间:
2020-06-19 00:52:45
阅读次数:
89
1 #-*- coding = utf-8 -*- 2 #@Time : 2020/6/16 20:52 3 #@Authur : Agur Zheng 4 #@File : loop_exercise.py 5 #@Software : PyCharm 6 7 # for循环,范围是包括起点不包括 ...
分类:
编程语言 时间:
2020-06-16 23:30:06
阅读次数:
77
九九乘法表 方式一:while循环实现九九乘法表 1 a = 1 2 while a <= 9: #纵向:循环9次, 3 b = 1 4 while b <= a: #横向:循环,依据第二个乘数,或者依据行数来控制循环次数 5 print("%dx%d=%-2d " % (a, b, a*b),en ...
分类:
其他好文 时间:
2020-06-09 23:26:37
阅读次数:
85
代码1:通过循环 one_number = 1 two_number = 1 while one_number <= 9: while one_number >= two_number: print(str(one_number)+'*'+str(two_number)+'='+str(one_nu ...
分类:
编程语言 时间:
2020-06-09 00:04:37
阅读次数:
129
在学习python的九九乘法表案例中发现新的关键词end,查询资料、博客整理如下: 参考博客https://www.cnblogs.com/DJRemix/p/11385286.html for i in range(1,10): for j in range(1,i+1): print(str(i ...
分类:
编程语言 时间:
2020-05-31 10:40:36
阅读次数:
226
//1.先让用户输入两个数m,n,写一个方法,打印m行,n列星星组成的矩形 function a(x,y){ for(i=1;i<=m;i++){ for( j=1;j<=n;j++){document.write("*");} document.write("</br>"); }} var m=p ...
分类:
其他好文 时间:
2020-05-30 11:01:50
阅读次数:
74
#for循环嵌套 #!/bin/bash for i in `seq 1 9`; do for j in `seq 1 $i`; do let "k=$i*$j" echo -ne "$i*$j=$k\t" done echo done 输出结果 #while循环嵌套 #!/bin/bash a=1 ...
分类:
系统相关 时间:
2020-05-26 00:49:33
阅读次数:
83
一、 for和while写99乘法表 二、break 循环控制 ...
分类:
编程语言 时间:
2020-05-21 21:17:51
阅读次数:
97
生成效果如下的 九九乘法表 import os, openpyxl from openpyxl.styles import Font #path = 'D:\\pyspace' #os.chdir(path) wb = openpyxl.Workbook() sheet = wb.active #从 ...
分类:
编程语言 时间:
2020-05-20 18:58:13
阅读次数:
73