0
私は友人の誕生日プレゼントを作っています。私は今までのすべてのMarvel Characterのデータベースを作っています。私はこれまでに2つを行って、それを試してみるとエラーと言います。私はコード全体を見て、私は多くを試してみましたが、それは動作していないようです。ここにコードがあります。Pythonでエラーを見つけるのに苦労します
from time import sleep
print ("Welcome to the Marvel Database please input the name of a marvel character you want to research. Please make sure you type the name as accurately as possible.")
character = input()
if character == 'A-Bomb':
print ("loading", sleep(.5), ".", sleep(.5), ".", sleep(.5), ".")
print ("Character found.")
sleep(.5)
print ("Name is A-Bomb.")
sleep(1)
print ("Unknown if they or it are Hero or Villan.")
sleep(1)
print ("No infomation found.")
sleep(1)
elif character == 'a-bomb':
print ("loading", sleep(.5), ".", sleep(.5), ".", sleep(.5), ".")
print ("Character found.")
sleep(.5)
print ("Name is A-Bomb")
sleep(1)
print ("Unknown if they or it are Hero or Villan.")
sleep(1)
print ("No infomation found")
sleep(1)
elif character == 'a bomb':
print ("loading", sleep(.5), ".", sleep(.5), ".", sleep(.5), ".")
print ("Character found.")
sleep(.5)
print ("Name is A-Bomb")
sleep(1)
print ("Unknown if they or it are Hero or Villan.")
sleep(1)
print ("No infomation found")
sleep(1)
elif character == 'A-bomb':
print ("loading", sleep(.5), ".", sleep(.5), ".", sleep(.5), ".")
print ("Character found.")
sleep(.5)
print ("Name is A-Bomb")
sleep(1)
:)「爆弾」をあなたは、各順列のために別々の
if
を作成する必要はありません上記のコードは、「原爆」のいずれかの総額で動作しますか? – dorukayhanあなたのコードを強調表示し、将来は '{}'ボタンを使用する必要があります。 –
'print(sleep(0.5))'は 'time.sleep()'の戻り値を出力します。これは常に 'None'です。 'sleep()'は 'print()'の前に評価されるので、スリープスリーププリントは 'sleep(1.5);とほぼ同じです。 print(...) ' – dhke