Question: BlockPy 29.2: BlockPy 29.4: Need to use assert_equal. Also getting 'not adequate' as an error = Fundamentals of Programming Assignments > Programming 29- Nesting Blocks

BlockPy 29.2:

BlockPy 29.2: BlockPy 29.4: Need to use assert_equal. Also getting 'not adequate'

BlockPy 29.4:

as an error = Fundamentals of Programming Assignments > Programming 29- Nesting

Need to use assert_equal. Also getting 'not adequate' as an error

= Fundamentals of Programming Assignments > Programming 29- Nesting Blocks Programming 29- Nesting Blocks Spring 2020 Home Announcements First Last BlockPy: #29.2) Possibly Undefined The code below is broken. Run the code and observe the error. Fix the code so that the the function calculate income will correctly decrease the salary by 10% if it is greater than $5,000 per year and otherwise return the salary adjusted Modules Syllabus Assignments Console: TEST PASSED TEST PASSED Feedback: Incorrect Answer View Trace Instructor Feedback Your code coverage is not adequate. You must cover at least half your code to receive feedback Grades Pages Collaborations Chat Evaluate Media Gallery My Media Run # Blocks Split Text Reset Import datasets Upload - History CoursEval Get Help on Circleln BlockPy Dashboard 1 from cisc108 import ansert equal 2 def calculate income (salary) : tax=1 if salary > 5000: tax-0.9 return falary Lax assert equal (calculate income (1000), 1000) 8 assert equal (calculate income (5000), 5000) AOD 10:50 PM Programming 29- Nesting Blocks Spring 2020 count Home Announcements First Last BlockPy: #29.4) Stay Positive Create a function named add bonitives that consumes two numbers and returns their sum. However, if either number is less than zero, you should instead return o. Unit test the function. hboard Modules Syllabus urses Assignments Console: FAILURE, predicted answer was '2', computed answer was '3'. FAILURE, predicted answer was '-2', computed answer was '3'. Feedback: Incorrect Answer View Trace Instructor Feedback Your code coverage is not adequate. You must cover at least half your code to receive feedback endar Grades Pages box Collaborations Chat Evaluate Media Gallery My Media Run Blocks Split Text Reset Import datasets Upload - ources 9History CoursEval from cisclos import assert equal 2 def add positives (a, b): if(a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!