adplus-dvertising
frame-decoration

Question

What is the output of the code shown below if the system date is 18th June, 2017 (Sunday)?
tday=datetime.date.today()
print(tday.weekday())

a.

6

b.

1

c.

0

d.

7

Answer: (a).6

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the code shown below if the system date is 18th June, 2017 (Sunday)?

Similar Questions

Discover Related MCQs

Q. The value returned when we use the function isoweekday() is ______ and that for the function weekday() is ________ if the system date is 19th June, 2017 (Monday).

Q. To include the use of functions which are present in the random library, we must use the option:

Q. What the does random.seed(3) return?

Q. Which of the following cannot be returned by random.randrange(4)?

Q. Which of the following is equivalent to random.randrange(3)?

Q. The function random.randint(4) can return only one of the following values. Which?

Q. Which of the following is equivalent to random.randint(3, 6)?

Q. Which of the following will not be returned by random.choice(“1 ,”)?

Q. Which of the following will never be displayed on executing print(random.choice({0: 1, 2: 3}))?

Q. What does random.shuffle(x) do when x = [1, 2, 3]?

Q. Which type of elements are accepted by random.shuffle()?

Q. What is the range of values that random.random() can return?

Q. Which of the following functions can help us to find the version of python that we are currently working on?

Q. Which of the following functions is not defined under the sys module?

Q. The output of the functions len(“abc”) and sys.getsizeof(“abc”) will be the same. State whether true or false.

Q. What does os.name contain?

Q. What does print(os.geteuid()) print?

Q. What does os.getlogin() return?

Q. What does os.close(f) do?

Q. What does os.fchmod(fd, mode) do?