Answer the question
In order to leave comments, you need to log in
What will be corrected in the code so that the answer contains not only a number, but also a text?
Please help me find the error.
Started learning Python, learned only variables and the second syntax lesson.
Given the task to write a code to calculate the ideal weight.
My weight comes out right, but the tex does not come out, I can’t understand where the error is.
v=int(input('Ваш идеальный вес по формуле Брока. Какого вы роста в сантиметрах ?'))
if(v <= 165 ):
x=int(input(v - 100))
print('Ваш идеальный вес','x')
elif(v<= 175):
x='Ваш'+ int(input(v - 105))
print('Ваш идеальный вес') + 'x'
elif(v>= 176):
x=int(input(v - 110))
print('Ваш вес должен составлять') + x
Answer the question
In order to leave comments, you need to log in
It is better to use this method
print('Your weight should be {} kg'.format(x))
in place of {} will
be your X, maybe a few, you will come to this a little later...
name = 'Игорь'
weight = 90
print('Ваш вес {} должен составлять {} кг'.format(name, weight))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question