程序在启动和重新启动时崩溃

Program crash on startup and restarts

我的程序运行正常,但有时在启动时会停止?或崩溃?并立即重新加载。我不知道为什么要这样做。这不是误会我。 它只是在我添加了睡眠功能后才开始的。

    import time
    print ( "loading cakes.. please wait")
    time.sleep(3)
    print ("cakes now loaded - enjoy your program")
    time.sleep(1)

    print ( "Enter a People Name" )
    name = (input())

    print ( "Enter Years of a People, I'll tell you the Years in Doggo : ", end = "")
    ppl = float(input())

    doggo = ppl * 7


    print (name, "Is a People, with a People Years of", ppl, )
    print (name,"'s Age in People Years is", ppl, " and is equal to", doggo, "Doggo Years " )
    time.sleep(2)
    print("(・・;) you're so old") 

picture of the thing

我认为这并不重要,但不胜感激。

我曾经遇到过这个问题,是 anti-viruscanner 引起的。它暂停了脚本来检查它,然后在清除扫描后重新启动它。

编辑,抱歉在评论中塞入代码。 (我的版本是Python2.7,不过3.x应该是一样的)

#!c:\Python27\python.exe
# -*- coding: utf-8 -*-
import time
print ( "loading cakes.. please wait")
time.sleep(3)
print ("cakes now loaded - enjoy your program")
time.sleep(1)
name = raw_input("Enter a People Name\n")
ppl = float(raw_input("Enter Years of a People, I'll tell you the Years in Doggo : "))
doggo = ppl * 7
print ("%s Is a People, with a People Years of %d" %(name, ppl))
print ("%s's Age in People Years is %d and is equal to %d Doggo Years " %(name, ppl, doggo))
time.sleep(2)
print("(・・;) you're so old")