Suppose t = (1, 2, 4, 3), which of the following is incorrect? November 15, 2023 administrator A. print(t[3])B. t[3] = 45C. print(max(t))D. print(len(t)) Share the Post Share the Post
To read the entire remaining contents of the file as a string from a file object infile, we use November 15, 2023November 15, 2023 administrator A. infile.read(2)B. infile.read()C. infile.readline()D. infile.readlines() Share the Post Share the Post
Which of the following formatting options can be used in order to add „n‟ blank spaces after a given string „S‟? November 15, 2023 administrator A. print(“-ns”%S)B. print(“-ns”%S)C. print(“%ns”%S)D. print(“%-ns”%S) Share the Post Share the Post
What is the output of the following program? tday=datetime.date.today() print(tday.month()) November 15, 2023November 15, 2023 administrator A. AugustB. AugC. 0D. 8 Share the Post Share the Post
Program code making use of a given module is called a __ of the module. November 15, 2023November 15, 2023 administrator A. ClientB. DocstringC. InterfaceD. Modularity Share the Post Share the Post
What is the length of sys.argv? November 15, 2023November 15, 2023 administrator A. number of argumentsB. number of arguments + 1C. number of arguments – 1D. none of the mentioned Share the Post Share the Post
What is the type of each element in sys.argv? November 15, 2023 administrator A. setB. listC. tupleD. string Share the Post Share the Post
What is the output of the following program : print ‘abcefd’.replace(‘cd’, ’12’) November 15, 2023November 15, 2023 administrator A. ab1ef2B. abcefdC. ab1efdD. ab12ed2 Share the Post Share the Post
What is the output of the following program : print ‘cd’.partition(‘cd’) November 15, 2023November 15, 2023 administrator A. („cd‟)B. (”)C. („cd‟, ”, ”)D. (”, „cd‟, ”) Share the Post Share the Post
What is the output of the following program : print ‘{0:-2%}’.format(1.0 / 3) November 15, 2023November 15, 2023 administrator A. 0.33B. 0.0033C. 0.3333D. 0.33 Share the Post Share the Post