1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
8090 [49]
3 years ago
14

Date Time Manipulation Exploration If you start from Jan 1st, 1757, and repeatedly add 8 days, until you hit 1800, how many time

s will it be a Monday? # YOUR CODE HERE def calcDays (): my_date = date(1757, 1, 1) m = 0 while my_date.year != 1800 : my_date = my_date + timedelta(days = 8) if my_date.isoweekday () == 1: m += 1 return m Make a function Once you have answered this question, convert your code into a generalized function. This function, call it count_weekdays should take: start_date: a start date (a datetime object) add_days : a number of days to add (an int) • stop_year: a stop year (an int) • weekday : a day to count, represented in isoweekday format (an int) It should return the number of weekday is that occur from the start date, until stop year, when adding add_days days.
Computers and Technology
1 answer:
zimovet [89]3 years ago
4 0

Answer:

from datetime import datetime, date, timedelta

def count_weekdays(start_date, add_days, stop_year, weekday):

   my_date = start_date

   m = 0  

   while my_date.year != stop_year:  

       my_date = my_date + timedelta(days = add_days)

       if my_date.isoweekday() == weekday:

           m += 1

   return m

date_val = date(1757,1,1)

try:

   date_val = datetime.fromisoformat(input("Enter date in the format yyyy-mm-dd: "))

except ValueError:

   print("Wrong isoformat string")

print(count_weekdays(date_val, 8, 1800, 1))

Explanation:

The datetime package of the python programming language has several time modules like the date, datetime, pytz, timedelta, etc, used to manipulate date and time in documents. The function count_weekdays has four parameters and returns the number of a specified weekday in a period of time.

You might be interested in
Andrew has data in cell E14 and the cell should be blank. Andrew should _____.
denpristay [2]
Use the mouse to click on cell E14 and press delete
4 0
3 years ago
Read 2 more answers
Which of the following is an example of intellectual property?
Gnesinka [82]

Answer:

B. Programming code for a video game

Explanation:

An item is considered an intellectual property if it is intangible in the sense that the actual property cannot be touched and it does not have a physical presence.

Options A, C and D do not fall in this category because they are tangible and they have physical presence.

Only option A, programming source code does not fall into this category.

Hence, <em>B. Programming code for a video game </em> answers the question

8 0
2 years ago
Explain the features of page layout software ​
BartSMP [9]

Answer:

Page Layout explains how the document pages are going to look like after printing. When we check the layout in Word, then we can see that the page layout covers the elements like margins, number of columns, option for editing the header and footers. Various types of layouts are like a magazine layout, static, adaptive, dynamic, and adaptive as well as responsive layout.

And these page layout techniques are being implemented for customizing the magazine appearance, books, newspapers, websites, and various other sorts of publications. And such page layout covers page's all elements. Some of the best page layout software are:

Microsoft Publishers

Scribus

Adobe InDesign

QuarkXpress

Xara

Download the free student version of Microsoft Office today, and explore Microsoft publisher to know more about it.

Explanation:

Please check the answer.

7 0
3 years ago
How might a company gain followers on Twitter?
Tresset [83]
By sending persuasive / informable and interesting posts to gain followers.
3 0
3 years ago
Declarative knowledge refers to statements of fact.
d1i1m1o1n [39]

The statement “Declarative knowledge refers to statements of fact” is TRUE.

The statement “Imperative knowledge refers to 'how to' methods” is also TRUE.

I am hoping that these answers have satisfied your queries and it will be able to help you in your endeavors, and if you would like, feel free to ask another question.

7 0
3 years ago
Other questions:
  • Ada lovelace designed the first computer
    7·1 answer
  • If you decide to get married, a trade-off would be that you have to give up being single.
    12·2 answers
  • If a person sends email from a school computer or a business computer, should that message be considered private?
    8·2 answers
  • The _____ is a blinking vertical line that indicates where the next typed character will appear. scroll box sheet tab insertion
    7·1 answer
  • Which of the following is the correct ordering of operating systems, oldest to newest?
    5·2 answers
  • What number system do people in America use?
    10·2 answers
  • Determine whether the phrase below is a sentence or a fragment.
    12·1 answer
  • A well-known production is making a documentary film titled “The Dwindling Population of Grizzly Bears in the United States.” Wh
    5·1 answer
  • When do you use a for loop instead of a while loop? (There may be more than one answer.)
    9·1 answer
  • What makes you normally visit the site-graphics, layout, or content? Why?​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!