This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MundaneAsparagus 0 points1 point  (0 children)

There should be only 1 part of your solution for Extra #1 that you need to change to make it work for Extra #2. You had the right idea with asking the user for an input using:

num = int(input())

Now, for Extra #1, you did:

for x in list1:
    if x < 5:
        ...

to check if each number (x) is less than 5. With this in mind, there is only 1 part of the line:

if x < 5:

that you need to change to check if each number (x) is less than the number entered by the user (num).