-2
私はインターネットなどで多くのことを探していましたが、回答を見つけることができませんTypeError: 'str'オブジェクトは呼び出し可能ではありませんバグ私は彼らのスコアを合計し、その後答えるようにユーザーのための質問をすることを意図している私のプログラムを実行しようとするたびに、私はTypeError: 'str'オブジェクトは呼び出し可能ではない問題
input = ("What is your name?")
print = ("I will ask you 10 questions and give you three choices for each question \n IMPORTANT! PLEASE KEEP YOUR CAPSLOCK ON")
score = 0
score = int(score)
q1 = input("What piece of code would show a word/sentence and nothing else \n A. print() \n B. input() \n C. int(print) ")
if q1 == ("A") :
print ("Well done! That is correct")
score = score + 1
print ("Your score is",score,)
elif q1 == ("B") :
print ("That is incorrect")
elif q1 == ("C") :
print ("That is incorrect")
を継続したい場合は、この問題を解決する必要がある、おかげで私を助けてください!
'print'関数を文字列で上書きしました。別の変数名を使用する –
@ Farhan.K OPはその名前に全く代入するつもりはないと思われます。実際には 'print()'を呼び出すことを意図していました。 –
@DanielRosemanええ、おそらくそうです。 @Pegafernoこの場合、 'print'の後に' = 'を取り除きたいでしょう –