| about | help | code help+videos | done | prefs |
pemdas_operator
This exercise does the EMDAS part of PEMDAS. That is, it gives you a function, pemdas_operator(ops, items), that will allow you to do the EMDAS part. Consider the MD part. The idea is that in "3+4*5", we do MD (multiplication and division) before AS (addition and subtraction). This transforms "3+4*5" into "3+(4*5)". In our notation, using a list of items, pemdas_operator(['*', '/'], [3, '+', 4, '*', 5]) should return [3, '+', [4, '*', 5]]. ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 534 Post-solution available
Copyright Nick Parlante 2017 - privacy