帮助!如您所见,我是编码的新手...大声笑我需要帮助删除我的代码输出的科学记法。我希望结果只显示为实数...即(删除“ e”)...我只想显示小数点后的2-4个数字。如果有人可以帮助我,将不胜感激。
Organism_A = 50
year = 1
for week in range(1,52*5 + 1):
if week%2 == 0:
Organism_A/=0.25
if week%4 == 0:
Organism_A*=2
if week%52 == 0:
print("At the end of year " + str(year) + " number of Organism A remaining = " + str(Organism_A))
year+=1
Organism_B = 250
year = 1
for week in range(1,52*5 + 1):
if week%1 == 0:
Organism_B/=0.25
if week%4 == 0:
Organism_B*=3
if week%52 == 0:
print("At the end of year " + str(year) + " number of Organism B remaining = " + str(Organism_B))
year+=1
Organism_C = 1000
year = 1
for week in range(1,52*5 + 1):
if week%1 == 0:
Organism_C/=0.13
if week%4 == 0:
Organism_C*=0.75
if week%52 == 0:
print("At the end of year " + str(year) + " number of Organism C remaining = " + str(Organism_C))
year+=1
答案 0 :(得分:0)