Friday , September 20 2024

Which program will produce the following output: Mo Tu We Th Fr Sa Su

Questions BankCategory: Python Essentials 2Which program will produce the following output: Mo Tu We Th Fr Sa Su
Which program will produce the following output:

Mo Tu We Th Fr Sa Su

A:

import calendar
print(calendar.weekheader(2))

B:

import calendar
print(calendar.weekheader())

C:

import calendar
print(calendar.weekheader(3))

D:

import calendar
print(calendar.week)
  • C
  • B
  • A
  • D

Explanation: The requested output represents the weekdays with only two letters. Therefore, the calendar.weekheader() method must receive 2 as an argument.

More Questions: Python Essentials 2 – Module 4 Test