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
This operating system was used by individual computers and required users to type commands.
In-s [12.5K]

Answer:

MS-DOS is your answer

Explanation:

6 0
3 years ago
What refers to the protocolâ s ability to ensure that data hasnâ t been modified in any way?
Tamiku [17]

Answer:

Option (b) Integrity

Explanation:

  • Data Integrity refers to the data which is not modified over the process, system.
  • Data Integrity here refers to which is not corrupted over the system in any way.
  • Throughout the life cycle of the process, system the data is intact and can be trusted for the future use.So, option (b) Integrity is the correct option.
  • Option (a) Confidentiality means the data that is kept secret, private but that doesn't mean it is not modified. So, option (a) confidentiality is wrong option.
  • Option (c) Authentication means the user is authenticated to use the data. It means the user has access to the data or not.So, option (c) is wrong option.
  • Option (d) Auditing means to examine, inspect a thing to find it fit for a purpose. Here, data auditing means verifying, inspecting,assessing the quality of data for a process.So, option (d) is wrong option.
3 0
3 years ago
A network technician is able to connect the switches between two offices, but the offices cannot communicate with each other, as
Contact [7]

Answer:

C) Router

Explanation:

In computer networking, the router's function is to stand in between diferent data lines and control the flow of data packets.  When a packet arrives from one direction, it reads the address information in the header to determine its direction. Note that the data lines will contain different IP addressing scheme, so considering the scenario in the above question, since the offices use different IP schemes, a router will serve the purpose of directing data packets to allow communication.

6 0
3 years ago
Do you need a internet browser to go to the intrnet?​
Sloan [31]

Answer:

No you do not need a interent browzer to get to the internet.

Explanation:

7 0
3 years ago
Read 2 more answers
A positive integer is called a perfect number if it is equal to the sum of all of its positive divisors, excluding itself. For e
Ad libitum [116K]

i = 1

while i < 10001:

   total = 0

   x = 1

   while x < i:

       if i % x == 0:

           total += x

       x+=1

   if total == i:

       print(str(i)+" is a perfect number")

   i += 1

When you run this code, you'll see that 6, 28, 496, and 8128 are all perfect numbers.

5 0
3 years ago
Other questions:
  • At regular intervals the AP in an infrastructure network or wireless device in an ad hoc network sends a ____ frame both to anno
    8·1 answer
  • Write a C++ program that searches for anagrams in a dictionary. An anagram is a word obtained by scrambling the letters of some
    5·1 answer
  • What in Microsoft word brings up mini toolbar
    7·1 answer
  • What is the opportunity cost of computers when moving from point A to point B? -15 DVDs b. What is the opportunity cost of compu
    13·1 answer
  • Correspondence involves verbal communication. True False
    6·2 answers
  • A client contacted you to request your help in researching and supplying the hardware necessary to implement a SOHO solution at
    5·1 answer
  • In 100 words or less, discuss why ethics is especially important for computer professionals, as it pertains to addressing profes
    5·1 answer
  • While developing a network application, a programmer adds functionally that allows her to access the running program without aut
    14·1 answer
  • Write a paragraph about ICT in personal life?
    12·1 answer
  • Guys, please help me asap (Photo Attached) !!!!!!! HELP 25pts!!!!
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!