R
R
Rifat Sharapov2021-03-16 11:28:57
Python
Rifat Sharapov, 2021-03-16 11:28:57

I am learning to program in python, in the task I need to get the sum of numbers, but the program only outputs the first line. How to fix it?

Here is the code:
car = input("Maintenance of Lamba's car: 2000")
car = int(car)
rent = int(input("Manhattan Apartment: 2000 "))
jet = int(input("Private Jet Rental: 2000 ") )
gifts = int(input("Gifts: 2000 "))
food = int(input("Dining Out: 2000 "))
staff = int(input("Staff (butlers, chef, driver, assistant): 2000 "))
guru = int(input("Personal Guru and Coach: 2000 "))
games = int(input("Computer Games: 2000 "))

total = car + rent + jet + gifts + food + staff + guru + games

print(" \nGrand Total:", total) input

("\n\nPress the enter key to exit.") Lamba car maintenance: 2000

Answer the question

In order to leave comments, you need to log in

3 answer(s)
1
12rbah, 2021-03-16
@lipstea

I ran the code, everything works, just type in the number and then Enter

D
Developer, 2021-03-16
@samodum

If you learned to hack, then you would know what print and input do.

S
soremix, 2021-03-16
@SoreMix

Press Enter...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question