ji tu = int (input(‘請(qǐng)輸入雞兔總數(shù):’))
tui = int (input(‘請(qǐng)輸入腿的總數(shù):’))
tu = (tui-ji tu*2)/2
if int (tu) = tu:
print (‘雞:’,ji tu-tu, ‘兔:’,tu)
else:
print (‘?dāng)?shù)據(jù)輸入不正確’)
import numpy as np
import matplotlib.pyplot as plt
x=np.arange(-1,2,0.01)
y=x**5+x**4+x-3
plt.plot(x,y)
plt.title('x^5+x^4+x-3')
plt.xlabel('X')
plt.ylabel('Y')
plt.show( )
下列選擇錯(cuò)誤的是( )
a=1
if a<0:
print("a<0")
print("a<0")
elif a<1:
print("0<a<1")
else:
print("a>=1")
a=35
b=94
for x in:
if 2*x+4*y==b:
print("雞有"+str(x)+"只","兔有"+str(y)+"只")
n=input(“請(qǐng)輸入一個(gè)實(shí)數(shù):”)
n2= math. floor(float(n))
print(n2)
score=int(input("請(qǐng)輸入一個(gè)分?jǐn)?shù)"))
if 100>=score>=90:
print("A")
if 90>score>=80:
print("B")
if 80>score>=60:
print("C")
if 60>score>=0:
print("D")
if score<0 or score >100:
print("輸入錯(cuò)誤!")