作业1:两个数交换,要求使用异或法完成
作业3.
score = int(input("请输入您的成绩"))
if score>=100:
print("nice满分")
elif score<100 and score>90:
print("优秀")
elif score<90 and score>80:
print("良好")
elif score<80 and score>70
print ("还可以,多努力")
elif score<60:
print ("不及格")
作业8.判断一个整数是奇数还是偶数,至少有两种方式实现
a=int(input("请输入一个整数:"))
if 0==a%2:
print ("这个数是二的倍数")
else:
print("这个数是二的倍数")
作业10:求矩形的面积和周长
作业11.根据天数(从控制台上输入)计算周数和剩余的天数
day=int (input(" 输入"))
wake=day//7
day1=7-(day%7)
print(f"周数为{wake} \n 剩余天数为{day1}")
作业12.根据已知圆的半径radius(从控制台上输入),求其面积和周长(PI可以使用Math.PI,也可以使用3.14)
r=float(input("请输入圆的半径"))
mian=3.14*r**2
zhou=3.14*2*r
print(f"圆的面积:{mian}\n圆的周长:{zhou}")