显示的Pycharm输出与其他解释器不同

时间:2019-11-03 01:51:26

标签: python pycharm

当我执行以下代码时,输​​出在Pycharm中显示不正确。 pycharm中的制表符间距与其他在线python解释器或jupyter笔记本相比有所不同。

organisms = int(input('Starting number of organisms: '))
increase = float(input('Average daily increase in percent (eg: 5 or 6): '))
days_to_multiply = int(input('Number of days for organisms to multiply: '))

print('Day Approximate\t Population')

for day in range(1,days_to_multiply + 1):
    print(day,'\t\t',organisms)
    organisms = organisms + organisms * (increase/100)

输出天数和人口未分别在“天数近似”和“人口”行下对齐。 Pycharm的输出: enter image description here

jupyter和在线python解释器的输出-https://www.onlinegdb.com/online_python_interpreter enter image description here 人口输出在“人口”下对齐

0 个答案:

没有答案