benchmarks.wiki / Public workspace

MBPP / 746 / Write a function to find area of a sector. The function takes the radius and…

Problem

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

prompt

Write a function to find area of a sector. The function takes the radius and angle as inputs. Function should return None if the angle is larger than 360 degrees.

test list

  • assert sector_area(4,45)==6.283185307179586
  • assert sector_area(9,45)==31.808625617596654
  • assert sector_area(9,361)==None

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