Created
June 20, 2018 09:17
-
-
Save KatiGithub/fed36c70e6c0d41f8872e69004eac011 to your computer and use it in GitHub Desktop.
This code asks for an input and then tells you numbers less than that on the list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
num = int(input("Choose a number from 1 to 10: ")) | |
new_list = [] | |
for i in x: | |
if i < num: | |
new_list.append(i) | |
print(new_list) | |
#You can increase te number on the array. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment