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
Step by step
Solved in 3 steps
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"