Question: To open a file c:scores.dat for binary writing, use Select one: a. outfile = open(c:scores.dat, w) b. outfile = open(c:scores.dat, a) c. outfile = open(c:scores.dat,


To open a file c:\scores.dat for binary writing, use Select one: a. outfile = open("c:\\scores.dat", "w") b. outfile = open("c:\scores.dat", "a") c. outfile = open("c:\\scores.dat", "w") d. outfile = open("c:\\scores.dat", "wb") What is tail recursion? Select one: a. A function where the recursive functions leads to an infinite loop b. A function where the recursive call is the last thing executed by the function CA recursive function where the function doesn't return anything and just prints the values d. A recursive function that has two base cases Fill in the line of the following Python code for calculating the factorial of a number. def fact(num): if num == 0: return 1 else: return Select one: a. num fact(num-1) b. (num-1)*(num-2) c. num(num-1) d. fact(num)*fact(num-1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
