0

a =[ 1, 1, 2, 3, 5, 8, 19, 21, 34, 55, 89 ]

a = [1, 1, 2, 3, 5, 8, 19, 21, 34, 55, 89] and write a program that prints out all the elements ofthe list that are less than 3. a. Instead ofprinting the elements cne by one, make a new list that has all the elements less than i from this list in it and print out this new list. b. Write this in one line ofPython. c. Ask the user for a number and return a list that contains only elements from the original list a that are smaller than that number given by the user. https://code.sololearn.com/WhRLs8CBia3O/?ref=app https://code.sololearn.com/WT8tK0ENAZBp/?ref=app

17th Jan 2021, 1:35 PM
Vishnu Muralidhar
Vishnu Muralidhar - avatar
4 Respuestas
+ 2
Vishnu Muralidhar Why you shared others code if you want solution in python?
17th Jan 2021, 4:15 PM
A͢J
A͢J - avatar
+ 1
a =[ 1, 1, 2, 3, 5, 8, 19, 21, 34, 55, 89 ] i = int(input()) x = [ x for x in a if x < i] print(x)
17th Jan 2021, 1:44 PM
Bahhaⵣ
Bahhaⵣ - avatar
17th Jan 2021, 1:36 PM
Vishnu Muralidhar
Vishnu Muralidhar - avatar
0
I don't know to tag relevant thing to post
17th Jan 2021, 4:29 PM
Vishnu Muralidhar
Vishnu Muralidhar - avatar