- 博客(6)
- 资源 (2)
- 收藏
- 关注
原创 用java打印一个乘法口诀
/*for (初始化表达式;循环条件;操作表达式) {……for (初始化表达式){……}……} 用for函数打印一个乘法口诀*/public class Example_15 { public static void main(String[] args) { int i, j; for (i = 1; i <= 9; i++) { for (j = 1; j <= i; j++) {
2022-01-02 12:26:58
187
原创 杨辉三角函数难吗?
杨辉三角函数n = int(input("杨辉三角形的行数:"))nums = [[0] * n for i in range(n)]for i in range(n) : for j in range(n) : if j == 0 : nums[i][j] = 1 else : nums[i][j] = nums[i-1][j-1] + nums[i-1][j] for i in r
2022-01-01 20:34:52
333
原创 石头剪刀布小游戏python编写
import random, sysprint('ROCK, PAPER, SCISSORS')#These variable keep track of the number of wins, losses, and ties.wins = 0losses = 0ties = 0while True: #The main game loop. print('%s Wins ,%s Losses, %s Ties' % (wins, losses, ties))
2021-12-27 16:16:58
2111
原创 如何制作一个猜数字的小游戏
#this is a gusee the number game.import randomsecretNumber = random.randint(1,30)print('I am thinking of a number between 1 and 30.')#Ask the player to guess 6 times.for guessesTaken in range(1,6): print('Take a guess.') guess = int(input
2021-12-27 16:10:18
1570
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人