+ 1

My mistake in "Hovercraft"!

So, this is the question:- You run a hovercraft factory. Your factory makes ten hovercrafts in a month. Given the number of customers you got that month, did you make a profit? It costs you 2,000,000 to build a hovercraft, and you are selling them for 3,000,000. You also pay 1,000,000 each month for insurance. *My code* num = float(input("Enter a number: ")) if num >= 8: print("Profit") elif num == 7: print("Broke even") else: print("Loss") Idk, whats wrong in this.. please someone help me! :(

10th Jan 2022, 8:24 AM
Rosy
Rosy - avatar
6 Réponses
+ 4
Ya but you don't have to write like enter the number you should simple write: ...= int(input())
10th Jan 2022, 8:30 AM
NEZ
NEZ - avatar
+ 1
Where did you calculated total sell and total cost? And what is 7 and 8?
10th Jan 2022, 8:25 AM
A͢J
A͢J - avatar
+ 1
A͢J I calculated it myself(not in the code) and just manipulated my code, according to that..
10th Jan 2022, 8:26 AM
Rosy
Rosy - avatar
+ 1
Continuing A͢J, why you wrote 'enter a number:'?!
10th Jan 2022, 8:28 AM
NEZ
NEZ - avatar
+ 1
NEZ well cuz, you need to enter a no.. like say 5 , 6, 7 or whatever it is.. something like this was written in sample question
10th Jan 2022, 8:29 AM
Rosy
Rosy - avatar
0
NEZ yh! u're correct, it helped..
10th Jan 2022, 8:34 AM
Rosy
Rosy - avatar