Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How many times is the function Info ( ) called if the user enters 0 and 1 in the first attempt? def Info ( num

How many times is the function Info() called if the user enters 0 and 1 in the first attempt?
def Info(num1, num2):
if (num1==0) or (num1==1):
print('Passed round 1.')
if (num2==1) or (num2==0):
print('Passed round 2.')
print('Good. You know your binary digits!')
else:
print('Numbers can be only 0s or 1s...Enter again')
arg1= int(input())
arg2= int(input())
Info(arg1, arg2)
else:
print('Numbers can be only 0s or 1s...Enter again')
arg1= int(input())
arg2= int(input())
Info(arg1, arg2)
print('Enter 2 numbers used in binary notation')
user_val1= int(input())
user_val2= int(input())
Info(user_val1, user_val2)
Question 1 options:
1
2
0
none

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

More Books

Students also viewed these Databases questions