Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Blockpy #22.2: I'm getting an incorrect answer for code that appears to be right. Help? Blockpy #22.3: Runtime error for my code. Thanks!! als of
Blockpy #22.2: I'm getting an incorrect answer for code that appears to be right. Help?
Blockpy #22.3: Runtime error for my code.
Thanks!!
als of Programming > Assignments Programming 22- Return and Print Programming 22- Return and Print First Last BlockPy: #22.2) Return greetting Write a function return grooting that consumes a name (as a string value) and retums Hello X, where x is the given name. So for example, if the name "Bruce Wayne was passed in the function should return Hollo Bruce Wayne. Unit test the function In other words, same thing as the previous problem, except this time the function returns instead of printing. Console: as "Hello Bruce Wayne'", computed answer was "HelloBruce Wayne'". View Trace Feedback: Incorrect Answer Student Unit Tests Failing Your unit tests are not passing. Evaluate Run Blocks Split Text Reset Import datasets Upload - History 1 from cisc108 import assert equal 2 def return greeting (X): return "Hello" +X 4 assert equal (return greeting ("Bruce Wayno"), "Hello Bruce Wayne") Fundamentals of Programming Assignments Programming 22- Return and Print Programming 22- Return and Print ncements BlockPy:#22.3) Used Return Create a function named pluralize that consumes a string and returns that string with an "." at the end (so "dog" would become ogs). Then, call this function on the string "Dog and assign the result to a variable in order to create the output I can pet othor DOG". Some code is given to you to help you get started. Don't forget to write a unit test! Notice that because this function returned a value, that value could be reused multiple times. ments Console: Dogs can pet other Dogs Feedback: Runtime Error View Trace TypeError Traceback: File "answer.py", line 8 assert_equal(pluralize("Dogs can pet other dogs")) TypeError: TypeError: assert equal() missing 1 required argumenty on line 8 rations Gallery Run Blocks Split Text S Reset Import datasets Upload - History 1 from cise 108 import assert equal wal p on Circleln Dashboard def pluralize(string): 5 return string's 6. noun - pluralize('Dog') 7 print (noun "can pet other noun) assert equal pluralize ("Dogs can pet other dogs"))Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started