Python Forum
define all function, interogate list, boolean
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
define all function, interogate list, boolean
#1
Hi there. I have a problem to solve in python.
I need to define an all function to see if all the elements of a list meet a certain condition. For example: all (>5) [1,2,3] = true, all (>=2) [1,1,2,2,3,3] = false. I can't find a solution, since I don't have enough knowledge of programming. Can anyone help me please?
Reply
#2
sounds like a homework to implement build-in function
Reply
#3
Do you know how to solve it?
Reply
#4
Actually, the question is, do YOU know how to solve it?
Expect this thread to be moved to Homework section by mods and be prepared to show us your attempt to solve it (i.e. post your code and ask specific question). Most of the people here know how to solve it, but will not do your homework for you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Question on "define function"; difference between return and print extricate 10 4,597 Jun-09-2020, 08:56 PM
Last Post: jefsummers
  Homework advice - Boolean function, whole-word values musicjoeyoung 4 3,187 May-07-2020, 06:10 PM
Last Post: musicjoeyoung

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020