fishmozi
发表于 2020-3-19 23:05:34
新手,还有很多不会
#include <stdio.h>
void main()
{
int i, j, result;
for (i = 1; i <= 9; i++)
{
for (j = 1; j <= i; j++)
{
printf("%d*%d=%-2d ", j, i, i * j);
}
putchar('\n');
}
return 0;
}
绿色钢笔帽
发表于 2020-3-21 00:51:17
print("来和我玩一个猜数字游戏吧!")
print("来猜猜现在我想的数字是几,1~10之间。")
temp = input("请输入你的答案 ")
answer = 3
number = 3
while number:
if temp ==answer:
print("You are so clever!")
break
print("That's not what I thought! ")
print("You will have",number-1,"chances!")
i = input("Try again!")
number -=1
大大怪将军33
发表于 2020-3-21 10:09:07
def earnest(a,b,c):
x1 = +((b**2)/((2*a)**2) - c/a)**(1/2) - b/(2*a)
x2 = -((b**2)/((2*a)**2) - c/a)**(1/2) - b/(2*a)
return x1,x2
print(earnest(1,6,-7))
a = int(input('请输入a:'))
b = int(input('请输入b:'))
c = int(input('请输入c:'))
temp = earnest(a,b,c,)
print(temp)
迈风啊
发表于 2020-3-23 16:57:47
>>> print("80*365*24*60*60")
80*365*24*60*60
>>> print(80*365*24*60*60)
2522880000
>>> 我是不是特别笨{:5_100:}
哦嗨哟吴
发表于 2020-5-9 19:44:50
import random
scel = random.randint(1,100)
print("-------------猜数字------------")
temt=input("请输入1到100以内的值:")
num=int(temt)
while num != scel:
temt=input("输错了,请重新输入吧:")
num=int(temt)
if num == scel:
print("你也太聪明了")
print("猜中也没奖励")
else:
if 1<= num < scel:
print("小了,小了")
else:
if scel < num <= 100:
print("大了,大了!!")
else:
print("超出1到100数字范围了")
print('好了,游戏结束!')
rbhr
发表于 2020-5-10 14:49:51
@echo off
set string="为什么叫小甲鱼呀"
echo %string%