Report Bug

Qus

What will be the output of the following Python code if the system date is: 6/19/2017

tday=datetime.date.today()

  tdelta=datetime.timedelta(days=10) 

print(tday+tdelta)

Qusयदि सिस्टम का दिनांक है: 6/19/2017, तो निम्न पायथन कोड का आउटपुट क्या होगा


A. 2017-16-19
B. 2017-06-9
C. 2017-06-29
D. Error


Solution
C. 2017-06-29



Explanation
The code shown above will add the specified number of days to the current date and print the new date. On adding ten days to 6/19/2017, we get 6/29/2017. Hence the output is: 2017-06-29.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad