Arrays · 11 / 23 Exercise Medium

Search an array of integers

Objective

Create a Python program to search for values in a list of integers. Follow these steps:

  • Get the quantity (x) of values of the list.
  • Build a list of integers with that quantity of values.
  • Get the number (y) to look for in the list.
  • Show whether the number (y) exists in the list or not.
  • Repeat the search until the text end is entered.
Input
3
2
5
3
5
end
Output
Number 5 exists

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise