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
Which allows for saving a setting on one device and having the setting synchronize to other devices? Choose two answers.
barxatty [35]

Answer:

Bookmarks

Calendars

Explanation:

In Android devices we could save some information and then share if we use sync, we case save Bookmarks and Calendars, in addition, we could save other data like:

  • History and open tabs
  • Passwords
  • Payment info  
  • Addresses, phone numbers and more
  • Settings and preferences

Also, if you don't want to save any data in your device, you can Turn off Sync everything.

3 0
4 years ago
Brenda also orders movies and television through the Internet via a(n) ____ provider, which allows users to download video for a
Novay_Z [31]

Brenda also orders movies and television through the Internet via a(n) VOD provider, which allows users to download video for a fee.

<h3>What is the meaning of the term VOD?</h3>

The term video-on-demand (VOD) is known to be a kind of technology made to send video content, such as movies and television programs, directly to specific customers for quick viewing.

Note that technology is constantly growing and one need to grow along with it. services that are good is often adopted by people.

Hence, Brenda also orders movies and television through the Internet via a(n) VOD provider, which allows users to download video for a fee.

Learn more about movies from

brainly.com/question/27936956

#SPJ1

5 0
2 years ago
Define a function in Scheme (or relation in Prolog) that checks whether a set of elements (represented as a list) is a subset of
mafiozo [28]

Answer:

subset([],[]).

       subset([X|L],[X|S]) :-

           subset(L,S).

       subset(L, [_|S]) :-

           subset(L,S).

Success:

     subset([1,3], [1,2,3]).

     subset(X, [1,3,4]).        % error handling to compare sets in a given order

Fail:

     subset([2,1], [1,2,3]).   % compares in a different order from the first.

Explanation:

The function "Subset" in the source code above accepts two sets, then checks if the first set is a subset of the second. The code returns true if the condition is met.

4 0
3 years ago
When you merge business letters, how many total documents will you have when you are finished with the merge process?
pychu [463]

Answer:

D. unable to determine – you will have one letter for each recipient on the list.

Explanation:

The reason because of this it depends on how many recipients there are to begin with.

Hope This Helps ;)

8 0
3 years ago
Read 2 more answers
Which of these is a significant reason why social change has taken place in the past 100 years?
agasfer [191]
C, because technology has changed our social life by texting and messaging.
Hope this helps
8 0
3 years ago
Other questions:
  • Write a program that calls fork(). Before calling fork(), have the main process access a variable (e.g., x) and set its value to
    5·1 answer
  • To add another worksheet to an Excel file, click on the _____
    15·1 answer
  • What is a sloper
    11·1 answer
  • cellPhoneBill(m,tx)Write the function cellPhoneBill()that takes two int m and txas input and returns a float.The function takes
    11·1 answer
  • A digital native is a person who has been exposed to technology at a(n) ___________ and is comfortable using it.a. old ageb. sch
    14·1 answer
  • Why do designers use tonal shading?
    10·2 answers
  • Write the definition of a class Counter containing:
    5·1 answer
  • Why is it important to ensure that DNS Servers have been secured before implementing an e-mail system
    7·1 answer
  • 56- What is the term used when you press and hold the left mouse key and more the mouse
    8·1 answer
  • (2 points) starting from the root node, we want to populate a bst with the keys in a given list without altering the key order.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!