Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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:

image text in transcribed

BlockPy 29.4:

image text in transcribed

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

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students explore these related Databases questions

Question

Influences on Nonverbal Communication?

Answered: 3 weeks ago