Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Fix hello.py to pass hello_test.py hello.py Files 1 # NAME: FIXME FIXME # ASSIGNMENT: veton.github 2 3 gitignore 4 5 6 # Example def

Pythonimage text in transcribedimage text in transcribedimage text in transcribed

Fix hello.py to pass hello_test.py

hello.py Files 1 # NAME: FIXME FIXME # ASSIGNMENT: veton.github 2 3 gitignore 4 5 6 # Example def hello_world(): return "Hello!" 0 replit 6 7 hello_test.py 8 9 hello.py # 1 def squared_sum(array): return 10 README.md 11 12 13 14 15 # 2 def mix(a, b): return 16 17 18 19 20 def main(): print("squared sum: print("mix: "1a2b3c4d") squared_sum([-3, 4])) , mix("1234", "abcd") == 21 22 main() Files + hello_test.py 1 import hello; 2 .github 3 Ogitignore 4 # Example Passing Test def test_hello_pass(): assert hello.hello_world() == "Hello!" 5 0 replit 6 7 hello_test.py: 8 9 hello.py 10 # Example Failed Test # Uncomment, run once & then comment out again #def test_hello_fail(): assert hello.hello_world() == "Hello World!" 11 README.md 12 # 13 14 15 # HW Assignment Tests ### ### 16 17 18 19 # Problem 1 Tests def test_squared_sum_empty(): assert hello.squared_sum( [] ) == 0 20 21 22 23 def test_squared_sum1(): assert hello.squared_sum( [4]) == 16 24 25 def test_squared_sum2(): assert hello.squared_sum((-3, 4]) == 25 26 27 hello_test.py Files 25 > github def test_squared_sum2(): assert hello.squared_sum( [-3, 4]) == 25 26 .gitignore 27 28 29 def test_squared_sum3(): | assert hello.squared_sum([5, -2, 3]) == 38 replit 30 31 hello_test.py: def test_squared_sum4(): || assert hello.squared_sum([7, -1, 15, 0]) == 275 32 hello.py 33 34 README.md 35 # Problem 2 Tests def test_mix_empty(): | assert hello.mix("", 36 "") 37 38 39 def test_mix_even(): assert hello.mix("hello", "there") == "htehlelroe" 40 41 def test_mix_4_4(): | assert hello.mix("1234", "abcd") == "1a2b3c4d" 42 43 44 def test_mix_2_4(): | assert hello.mix("12", "abcd") == "1a2bcd" 45 46 47 48 def test_mix_4_2(): assert hello.mix("1234", "ab") == "1a2b34

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

Step: 3

blur-text-image

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

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

57 Occupational injury and illness compensation and programs.

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago