Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Count of sums
#3
When I run this script, I get a result that looks like this:

(0, 0, 0, 1, 1) => 2
(0, 0, 0, 1, 2) => 3
(0, 0, 0, 1, 2) => 3
(0, 0, 0, 1, 1) => 2
(0, 0, 0, 1, 2) => 3
(0, 0, 0, 1, 2) => 3
(0, 0, 0, 1, 1) => 2
(0, 0, 0, 2, 2) => 4
(0, 0, 0, 2, 1) => 3
(0, 0, 0, 2, 1) => 3
(0, 0, 1, 1, 2) => 4
(0, 0, 1, 1, 2) => 4
(0, 0, 1, 1, 1) => 3
(0, 0, 1, 2, 2) => 5
(0, 0, 1, 2, 1) => 4
(0, 0, 1, 2, 1) => 4
(0, 0, 1, 2, 2) => 5
(0, 0, 1, 2, 1) => 4
(0, 0, 1, 2, 1) => 4
(0, 0, 2, 2, 1) => 5
(0, 0, 1, 1, 2) => 4

On the right is the sums of subsets which are in parenthesis. I'd like to count numbers of say 4s, 5s, 6s etc and printed at the bottom. How can I achieve this?
Reply


Messages In This Thread
Count of sums - by mattis - Oct-22-2018, 07:55 PM
RE: Count of sums - by Larz60+ - Oct-22-2018, 08:14 PM
RE: Count of sums - by mattis - Oct-22-2018, 08:21 PM
RE: Count of sums - by nilamo - Oct-22-2018, 08:26 PM
RE: Count of sums - by mattis - Oct-22-2018, 08:36 PM
RE: Count of sums - by nilamo - Oct-22-2018, 08:40 PM
RE: Count of sums - by mattis - Oct-22-2018, 08:44 PM
RE: Count of sums - by Larz60+ - Oct-22-2018, 08:49 PM
RE: Count of sums - by Larz60+ - Oct-22-2018, 08:50 PM
RE: Count of sums - by mattis - Oct-22-2018, 08:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Row Count and coloumn count Yegor123 4 1,381 Oct-18-2022, 03:52 AM
Last Post: Yegor123

Forum Jump:

User Panel Messages

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