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
taurus [48]
2 years ago
5

Write a program that would determine the day number in a non-leap year. For example, in a non-leap year, the day number for Dec

31 is 365; for Jan 1 is 1, and for February 1 is 32. This program will ask the user to input day and month values. Then it will display the day number day number corresponding to the day and month values entered assuming a non-leap year. (See part II to this exercise below).
Computers and Technology
1 answer:
SOVA2 [1]2 years ago
7 0

Answer:

In Python:

months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]

daymonths = [31,28,31,30,31,30,31,31,30,31,30,31]

day = int(input("Day: "))

month = input("Month: ")

ind = months.index(month)

   

numday = 0

for i in range(ind):

   numday+=daymonths[i]

numday+=day

print(numday)    

Explanation:

This initializes the months to a list

months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]

This initializes the corresponding days of each month to a list

daymonths = [31,28,31,30,31,30,31,31,30,31,30,31]

This gets the day from the user

day = int(input("Day: "))

This gets the month from the user

month = input("Month: ")

This gets the index of the month entered by the user

ind = months.index(month)

This initializes the sum of days to 0

numday = 0

This adds up the days of the months before the month entered by the user

<em>for i in range(ind):</em>

<em>    numday+=daymonths[i]</em>

This adds the day number to the sum of the months

numday+=day

This prints  the required number of days

print(numday)    

<em>Note that: Error checking is not done in this program</em>

You might be interested in
I got a 52 on my test :(
Eduardwww [97]

Answer:

that sucks i hope u can do better next time have a good day

Explanation:

7 0
3 years ago
Which of the following scan only works if operating system’s TCP/IP implementation is based on RFC 793?
Shkiper50 [21]

Answer:NULL Scan

Explanation:RFC 793(Request for comments) is a type of RFC command labeled with the number 793 which can operate with the TCP protocol.They are sort of document form which is from IETF( Internet Engineering Task Force ).

The null scan is scanning protocol used by legal as well as illegal hackers for working in the transfer control protocol architecture. It is used for the identification of the the ports and holes in TCP servers.they can also have the negative impact if used by the illegal hackers.

5 0
2 years ago
Part of implementing Ken 7 Windows Limited new enterprise resource planning (ERP) software is ensuring all workstations and serv
spayn [35]

Answer:

Explanation:

1) The Functions a software application provide to keep a web browser secured includes:

a) The web browser should always be updated, you can keep it on "automatic update" option enable on your browser settings so that it will be automatically updated whenever the browser gets an update.

b) Always keep the third party cookies disabled because of the many unauthorized and phishing sites over the internet. This leaves the browser unsafe and cause higher security risk so block all the third party sites and cookies from the browser.

2) The Functions a software application prohibit to keep a web browser secured includes:

a) Do not store passwords on your web browser, deny the "store password" option on your browser settings. This is very important Even if you store passwords on your web browser do set a very strong master password to access all the stored passwords.

b) Don't ever click on unwanted and unknown hyperlinks. There will be many unsolicited attachments, files, etc over the internet please do not open or download it unnecessarily.

3) The functions a software application should provide to keep a web server secured includes:

a) Always using an application scanner. Whenever you install or download any new applications, scan the application before accessing it or opening it.

b) Install all the security patches to keep off hackers as they are many on the internet.

4) The Functions a software application should prohibit to keep a web server secured includes:

1) Uninstall an application that has not been used for long time, because they are actually of no use.

b) There may be scripts, files, setups, codes stored on the web server unknowingly so do check it and delete all the sample scripts, files and codes from the web server.

3 0
3 years ago
Generally considered to be the most important information security policies, what item below defines the actions a user may perf
tamaranim1 [39]

Answer:

A. Acceptable use policies

Explanation:

These specific actions that the user may perform are all described in the acceptable use policy. The company usually requires that the user read and sign this policy before being granted a network ID into the system itself. By signing this agreement the individual user agrees to perform ONLY the actions listed in the agreement and nothing else and are restricted from unauthorized areas.

3 0
3 years ago
What is the provincial capital of lumbini province​
olchik [2.2K]

Answer:

hope it helps..

Explanation:

Butwal(recently changed again) , Rupendhai District

5 0
2 years ago
Other questions:
  • Write a program to prepare the monthly charge account statement for a customer of CS CARD International, a credit card company.
    11·1 answer
  • What does Intel mean in this phrase(collect all intel).
    9·2 answers
  • The prefix kilo stands for which one of the following values? A. 100 or 102 B. 1000 or 103 C. 1,000,000 or 106 D. 10,000 or 104
    15·2 answers
  • 2. What is “suspension of disbelief?” Which form of immersion is it most closely associated with?
    9·2 answers
  • If you have two tasks x and y, with y being a successor to x, if we mark x as undone (because it needs to be redone for some rea
    15·1 answer
  • Calculate the change in RGDP if the MPC is .6 and initial spending is $500,000.
    8·1 answer
  • He flow of electric charges through a material describes an electric _______.
    10·1 answer
  • Suppose an IP packet is fragmented into 10 fragments, each with a 1% (independent) probability of loss. To a reasonable approxim
    15·1 answer
  • What are some limitations when it comes to testing and ensuring program quality? List at
    15·1 answer
  • What does it mean when someone silences notifications?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!