Question: Hi! The problem is to make a calculator for a game where you collect boars, cattle etc. each animal has a different point value. My
Hi! The problem is to make a calculator for a game where you collect boars, cattle etc. each animal has a different point value. My code is finished and I ran my code and evertyhing works fine but at the end it isn't displaying. the actual value of the total, just the word total
this is my code
sheep=int(input("How many sheep did you get?")) boar=int(input("How many boar did you get?")) cattle=int(input("How many cattle did you get?")) Total=0 if sheep = 0: Print('-1') Total - 1 if sheep < 4 : if sheep>0: Print ( ' +1 ' ) Total + 1 if sheep < 6 : if sheep > 3 : Print( ' +2 ' ) Total + 2 if sheep < 8 : if sheep > 5 : Print( ' +3 ' ) Total + 2 if sheep = 8 : if sheep > 8 : Print( ' +4 ' ) Total + 4 if boar = 0 : Print( ' -1 ' ) Total +-1 if boar > 0 : if sheep < 3 : Print( ' +1' ) Total + 1 if boar > 3 : if sheep < 6 : Print( ' +2' ) Total + 2 if boar > 4 : if sheep < 7 : Print( ' +3' ) Total + 3 if boar = 7 : if boar > 7 : Print( ' +6' ) Total + 6 if cattle = 0 : Print( ' -1' ) Total - 1 if cattle > 1 : if cattle < 4 : Print( ' +2' ) Total + 2 if cattle > 3 : if cattle < 6 : Print( ' +3' ) Total + 1 if cattle =6 : if cattle > 6 : Print( ' +4' ) Total + 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
