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()

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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()
Transcribed Image Text: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()
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
Transcribed Image Text: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
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

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"

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Image Element
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education