Answer the question
In order to leave comments, you need to log in
Where to write numbers so that Python would count them?
car = input ("Техническое обслуживанаие машины 'Ламборгини': ")
rent = (input("Съем раскошной квартиры В Манхэттене: "))
jet = (input("Аренда самолета: "))
gifts = (input("Подарки: "))
food = (input("Обеды и ужины в ресторанах: "))
staff = (input("Жалованье прислуги: "))
guru = (input("Плата личному психоаналитику: "))
games = (input("Компьютерные игры: "))
total = car + rent + jet + gifts + food + staff + guru + games
print("\nОбщая сумма:", total)
Answer the question
In order to leave comments, you need to log in
Compare two lines and think where is the mistake
car = input ("Техническое обслуживанаие машины 'Ламборгини': ")
rent = (input("Съем раскошной квартиры В Манхэттене: "))
Look closely at these two lines:
car = input ("Lamborghini Maintenance: ")
rent = (input("Luxury Apartment Rent In Manhattan: "))
The first stores the value entered by the user under the name car, and the second stores there a tuple with one element - the value entered by the user.
When adding tuples, they are concatenated, which was clearly not required in the assignment.
Remove extra brackets.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question