0
私はモジュールを使いこなしていますが、モジュールを乗算しながらユーザー入力を検証しようとしています。私が邪魔していないサークルの領域が、私は一度これを把握します。長方形の領域は私が問題があるものです。これは初めて動作しますが、ユーザーが何か間違った情報を入力した後、再度入力すると、none型として表示されます。あなたがしたときにエラーの後Rectangle_WidthまたはRectangle_Heightを再呼び出し、あなたはドン」 -TypeError-サポートされていないオペランドタイプ
def Area_Of_A_Rectangle():
print("To Find the Area of a Rectangle we need two things")
print("The Area of a Rectangle: ",Rectangle_Height() * Rectangle_Width())
##!--------------------Validation Modules------------------!##
#-----Rectangle Height Input------------------------------------------------
def Rectangle_Height():
try:
Rec_Height = float(input("What is the Height of your Rectangle: "))
except ValueError:
print("Please Try Again!")
Rectangle_Height()
else:
return Rec_Height
#-----Rectangle Width-------------------------------------------------------
def Rectangle_Width():
try:
Rec_Width = float(input("What is the Width of your Rectangle: "))
except ValueError:
print("Please Try Again!")
Rectangle_Width()
else:
return Rec_Width
Area_Of_A_Rectangle()
テキストとしてではなく、イメージとしてのコードを投稿してください。 – Renzo
よろしくお願いします... – Hoyt