benchmarks.wiki / Public workspace

MBPP / 442 / Write a function to find the ration of positive numbers in an array of integers.

Problem

Answer published by the source. Consult the official source to check your work against its answer.

test list

  • assert positive_count([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8])==0.54
  • assert positive_count([2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8])==0.69
  • assert positive_count([2, 4, -6, -9, 11, -12, 14, -5, 17])==0.56

text

Write a function to find the ration of positive numbers in an array of integers.

Discussion

Discussion

No discussion posts on this page yet. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

Source and history

Official source

initial import