Fulfill the test case in the provided notepad++ image Note: do not replace anything in the notepadd++ image Here is "w04c_ans.py" follow the function constrainst in the provided image and make sure to run "w04c_test_public" with the same folder with "w04c_ans.py" and check if the test case is fulfilled def print_frame(): pass def is_valid_num(): return False def main(): while True: num_frames = input('Enter number of frames from 2 to 10 inclusive: ') if not is_valid_num(num_frames): print('Entered input is either not a number or is not between 2 and 10 inclusive. Please try again.') continue num_frames = int(num_frames) print_frame(num_frames) break if __name__ == '__main__': main()
Fulfill the test case in the provided notepad++ image
Note: do not replace anything in the notepadd++ image
Here is "w04c_ans.py" follow the function constrainst in the provided image and make sure to run "w04c_test_public" with the same folder with "w04c_ans.py" and check if the test case is fulfilled
def print_frame():
pass
def is_valid_num():
return False
def main():
while True:
num_frames = input('Enter number of frames from 2 to 10 inclusive: ')
if not is_valid_num(num_frames):
print('Entered input is either not a number or is not between 2 and 10 inclusive. Please try again.')
continue
num_frames = int(num_frames)
print_frame(num_frames)
break
if __name__ == '__main__':
main()
This is not a graded assignment. I just need some help
![w04c_test_public.py x w04c_tpl.py X
import io
import textwrap
1
2
3
4
5
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
in A
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
0-0
파
import unittest
from unittest.mock import patch
-0-0
# TODO: Replace w04c_ans with the name of your Python file.
Make sure that this file and that file are in the same
folder.
#
#
from w04c_ans import print_frame, is_valid_num
class TestIsValidNum (unittest. TestCase) :
def test_pt01 (self):
a_test= is_valid_num('2')
self.assertTrue (a_test)
def test_pt02 (self):
if
a_test= is_valid_num ('-5')
self.assertFalse (a_test)
def test_pt03 (self):
a_test
THI def test_pt01 (self, mocked_print):
print_frame()
-
class TestPrintFrame (unittest. TestCase):
@patch('sys.stdout', new_callable-io.StringIO)
self.assertFalse (a_test)
is_valid_num('512abc32')
self.assertEqual (
name
mocked_print.getvalue (),
textwrap.dedent (
=
main ':
unittest.main()](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8a6d4767-cab8-47f3-8e62-533577e971c9%2F0353aaad-f3fa-4d95-8dd0-6ac4a9306797%2Ff0b943n_processed.png&w=3840&q=75)
![Functional Constraints
You are required to have the following function signatures, their arguments in order, and their
return values:
print_frame - prints a bowling score frame spanning a certain number of games
O Arguments
len_frames -number frames to print; default is 10
O Return value - None; should print five lines denoting an ASCII-generated bowling
scoreboard
is_valid_num - computes whether the number entered is within the constrained range
O Arguments
O
num_in-number to check
Return value - bool representing True if the number is between 2 and 10 inclusive
or False otherwise
H](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8a6d4767-cab8-47f3-8e62-533577e971c9%2F0353aaad-f3fa-4d95-8dd0-6ac4a9306797%2F2objo47_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
when I try to compile it the error says
"D:\Downloads\try>python w04c_test_public.py
Traceback (most recent call last):
File "D:\Downloads\try\w04c_test_public.py", line 9, in <module>
from w04c_ans import print_frame, is_valid_num
File "D:\Downloads\try\w04c_ans.py", line 6
print('*' * num_frames)def is_valid_num(num_frames):
^^^
SyntaxError: invalid syntax"
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)