To read the entire remaining contents of the file as a string from a file object infile, we use

To read the entire remaining contents of the file as a string from a file object infile, we use
infile.read()
Good Your Answer is Correct
infile.read()
infile.readline()
infile.readlines()

Suppose t = (1, 2, 4, 3), which of the following is incorrect?

Suppose t = (1, 2, 4, 3), which of the following is incorrect?
t[3] = 45
Good Your Answer is Correct
t[3] = 45
print(max(t))
print(len(t))

What is the output of the following program : print ‘abcefd’.replace(‘cd’, ’12’)

What is the output of the following program : print ‘abcefd’.replace(‘cd’, ’12’)
abcefd
Good Your Answer is Correct
abcefd
ab1efd
ab12ed2

Program code making use of a given module is called a __ of the module.

Program code making use of a given module is called a ______ of the module.
Client
Good Your Answer is Correct
Docstring
Interface
Modularity

What is the output of the following program? tday=datetime.date.today() print(tday.month())

What is the output of the following program? tday=datetime.date.today() print(tday.month())
8
Good Your Answer is Correct
Aug
0
8

Which of the following formatting options can be used in order to add „n‟ blank spaces after a given string „S‟?

Which of the following formatting options can be used in order to add „n‟ blank spaces after a given string „S‟?
print(“%-ns”%S)
Good Your Answer is Correct
print(“-ns”%S)
print(“%ns”%S)
print(“%-ns”%S)

What is the type of each element in sys.argv?

What is the type of each element in sys.argv?
string
Good Your Answer is Correct
list
tuple
string

What is the output of the following program : print ‘cd’.partition(‘cd’)

What is the output of the following program : print ‘cd’.partition(‘cd’)
(”, „cd‟, ”)
Good Your Answer is Correct
(”)
(„cd‟, ”, ”)
(”, „cd‟, ”)
Page 1 of 174
1 2 3 174