Commit 5ffa677d by BellCodeEditor

auto save

parent d7786566
Showing with 83 additions and 0 deletions
......@@ -17,4 +17,5 @@ while True:
print("温馨提示:您还有"+str(i)+"次登录机会")
else :
print("您的账户已被锁定!")
exit()
print("欢迎来到贝尔编程!")
\ No newline at end of file
# N=input('请输入一个数字:')
# if N=='10':
# print('yes')
# else:
# print('no')
# y=int(input('请输入语文成绩:'))
# m=int(input('请输入数学成绩:'))
# e=int(input('请输入英语成绩:'))
# a=y+m+e
# if a>285:
# print('去游乐园')
# elif 241<a<=285:
# print('做一天作业')
# else:
# print('周末两天都做作业')
# a=int(input('请输入一个整数:'))
# b=int(input('请输入一个整数:'))
# if a/b==3:
# print('恭喜')
# else:
# print(a/b)
# a=int(input("请输入一个整数:"))
# if a==1:
# print('Monday')
# elif a==2:
# print('Tuesday')
# elif a==3:
# print('Wednesday')
# elif a==4:
# print('Thursday')
# elif a==5:
# print('Friday')
# elif a==6:
# print('Saturday')
# elif a==7:
# print('Sunday')
# else:
# print('false')
# a=int(input("请输入数字a:"))
# b=int(input("请输入数字b:"))
# c=int(input("请输入数字c:"))
# if a+b>c and a+c>b and b+c>a:
# print('能组成三角形')
# else:
# print('不能组成三角形')
f=input('请输入运算符号:')
if f==list('+','-','*','/'):
a=int(input('请输入数字1:'))
b=int(input('请输入数字2:'))
if f=='+':
print(a+b)
elif f=='-':
print(a-b)
elif f=='*':
print(a*b)
elif f=='/':
if a/b==0:
print('Divided by zero')
else:
print(a/b)
else:
print('Invalid operator')
# a=int(input('请输入数字1:'))
# b=int(input('请输入数字2:'))
# print(str(a)+"+"+str(b)+"="+str(a+b))
# print(str(a)+"-"+str(b)+"="+str(a-b))
# print(str(a)+"*"+str(b)+"="+str(a*b))
# print(str(a)+"/"+str(b)+"="+str(a/b))
# print(str(a)+"**"+str(b)+"="+str(a**b))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment