T
T
Tiana72021-08-02 23:47:28
Python
Tiana7, 2021-08-02 23:47:28

How to make an input inactive under a certain condition?

rating = int(input('Enter a place in the list of applicants: '))
quantity_points = int(input('Enter the number of points for exams: '))

! it is necessary that, if rating > 10
, input 'Enter the number of points for exams is not displayed: '

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tiana7, 2021-08-02
@Tiana7

rating = int(input('Enter a place in the list of applicants: '))
if rating >= 1 and rating <= 10:
quantity_points = int(input('Enter the number of points for exams: '))
if quantity_points >= 290:
print ('Congratulations, you got in!')
print('Your scholarship will be awarded as a bonus.')
else:
print('Congratulations, you got in!')
print('But you didn't have enough points for the scholarship.')
else:
print(' Unfortunately, you didn't get in.')

M
Michael, 2021-08-02
@lob4Noff

rating = int(input('Введите место в списке поступающих: '))
if rating > 10:
    quantity_points = int(input('Введите количество баллов за экзамены: '))
else:
    print('rating <= 10')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question