Answer the question
In order to leave comments, you need to log in
Removing a given from a list?
Hello, how can I make it so that the user is prompted to enter a number from 1 to 10, by entering any number he will be shown a specific phone number from the numbering, and if he tries to enter another number will give an error?
electronics_store = ['Samsung S9+', 'Samsung S10', 'Samsung S20Ultra','Samsung S20+','Samsung S20','Huawei P30','iPhoneX','iPhone11','iPhone12ProMax','iPhoneSE']
print('Введите число от 1 до 10: ')
Answer the question
In order to leave comments, you need to log in
n = int(input('Введите число от 1 до 10: '))
if n <=10 and n >=1:
print(electronics_store[n-1])
else:
print('Неправильное число')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question