Physics, asked by Pythoncoder2, 9 months ago

Write a python program to find the first day of given year Danger note : Spammers stay away Question for only Python coders

Answers

Answered by Anonymous
4

Answer:

In this tutorial, we will cover python datetime module and how it is used to handle date, time and datetime formatted columns (variables). It includes various practical examples which would help you to gain confidence in dealing dates and times with python functions. In general, Date types columns are not easy to manipulate as it comes with a lot of challenges like dealing with leap years, different number of days in a month, different date and time formats or if date values are stored in string (character) format etc.

Answered by Anonymous
1

Note : Output of program is in attachment

Answer :

# This code is given by RockstarPratheek (@Brainly.in)

import datetime  

def Startingday(year):  

 

# Creating an object for 1st January of that particular year  

# For that we are passing three argument (1) year (2) month  

# i.e 1 for january (3) date i.e 1 for starting day of  

# that particular year  

a = datetime.datetime(year, 1, 1)  

# for printing Startingday of a particular year  

# we are using a.strftime("% A")  

print("Starting day of year ", year, " is ", a.strftime("%A"))  

# Driver Code  

year = int(input("Enter a year : "))

Startingday(year)

#Code by Pratheek

Attachments:
Similar questions