fixed except statement

This commit is contained in:
2022-07-15 12:59:59 -05:00
parent 75c182c85b
commit e4e9c8c709
+1
View File
@@ -113,6 +113,7 @@ class semi_Truck(RoadVehicle, GroundVehicleInterface):
print(f"The semi truck is {self.status}.", f"Cargo weight is {self.weight}.")
except ValueError:
self.weight = _weight + int(input(f"That entry was not an integer. Enter cargo weight in integers only."))
print(f"The semi truck is {self.status}.", f"Cargo weight is {self.weight}.")
'''
Error message
Enter cargo weight (integer values only).70000