unit 9 assignment edhesive

Answers

Answer 1

The program is an illustration of functions, that involves a group of code segments that are executed when called or evoked

The calendar program

The calendar program in Python, where comments are used to explain each line is as follows:

#This checks for leap year

def leap_year(y):

  if y % 4 == 0:

      return 1

  else:

      return 0

#This returns the number of days in the month

def number_of_days(m,y):

  if m == 2:

      return 28 + leap_year(y)

  elif m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m ==10 or m == 12:

      return 31

  elif m == 4 or m == 6 or m == 9 or m == 11:

      return 30

#This returns the number of days left in the month

def days(m,d):

  dayList = [0,31,59,90,120,151,181,212,243,273,304,334]

  return dayList[m-1] + d

#This returns the number of days left in the year

def days_left(d,m,y):

  if days(m,d) <= 60:

      return 365 - days(m,d) + leap_year(y)

  else:

      return 365 - days(m,d)

#The main begins here

#This next three lines gets input for date

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

month=int(input("Month: "))

year=int(input("Year: "))

#This gets the choice from the user

menu=int(input("Press 1 to calculate the number of days in the given month.\nPress 2 to calculate the number of days left in the given year.\nChoice: "))

#This prints the number of days in the month

if menu == 1:

  print(number_of_days(month, year))

#This prints the number of days left in the year

elif menu == 2:

  print(days_left(day,month,year))

Read more about Python functions at:

brainly.com/question/14284563


Related Questions

critics of media consumption
A. do not believe we should do away with media altogether
B. agree that our society would be better off without media
C. argues that all media is a deterrent to the growth of society
D. do not want obese children to use technology and media

Answers

Answer:

b

Explanation:

make me brainlyest plzz

sorry if i got it wrong

Answer:

b i think

Explanation:CHECK IT FIRST

Which of the following may be purposes of packaging?
O Help the product stand out from the competition
O Make the product easier to use
O Protect the product and the people who buy it
O All of the above

Answers

JakauehahshvasuwvevaiN

Answer:

D

Explanation:

some critics aruge that excessive media consumption can encourage______.
A. deeper reading
B. taking breaks from using digital media
C an unhealthy lifestyle
D. healthy friendships

Answers

c. an unhealthy lifestyle

Why does a computer need primary and secondary memory ?

Answers

Primary memory are generally faster but costlier
And secondary memory are slower but cheaper
You need a combination of both
So need most frequently used apps in your primary memory and least ones like videos photos images in secondary

Film directors generally earn more money than theater directors. True False

Answers

Yes, it’s true they earn more. Film directors earn between $250,000 to 2 million per project. New directors typically earn between $250,000 to $500,000 per film, while film directors earn about $1 million per movie.
Theatre directors in the UK earn on average £10,759 a year from their craft- well below the £27,000 take home annual salary national average- with some directing jobs paying less than £1 an hour, new research has revealed.

Answer:

Yes, it's true on edge 2022.

jordan needs to create an employee handbook. the handbook will have several written pages with bold text, plain text, and numbered lists. jordan should use a (n)
A) Spreadsheet
b) database
c) e-mail
d) word processor

Answers

D

is most likely the correct answer

Use the drop-down menus to complete statements about importance and sensitivity levels. The Low Importance level is rarely used, and the High Importance level should be used . The sensitivity levels are personal, private, and . Sensitivity levels are basically only , as they appear on the Info Bar in the message.

Answers

Answer:

first blank- cautiously

second blank- confidential

third blank- informational

Explanation:

i got it correct on edge 2020

The Low Importance level is rarely used, and the High Importance level should be used cautiously.

What is cybersecurity?

Cybersecurity can be defined as a preventive practice that involves the protection of computers, networks, software programs, servers and data (information) from unauthorized access, potential theft, attack, or damage, especially by using a body of technology, frameworks, processes and network engineers.

In Cybersecurity, the use of the various security levels include:

The sensitivity levels are personal, private, and confidential. Sensitivity levels are basically only informational, as they appear on the Info Bar in the message.

Read more on Cybersecurity here: https://brainly.com/question/14286078

#SPJ2

Which of the following actions is most likely to raise legal or ethical concerns?
A
An analyst writes a program that scans through a database of open-access scientific journals and creates a document with links to articles written on a particular topic.
Sut
B
A computer scientist adds several features to an open-source software program that was designed by another individual.
с
A musician creates a song using samples of a copyrighted work and then uses a Creative Commons license to publish the song.
D
A public interest group alerts people to a scam that involves charging them for a program that is available for free under a Creative Commons license
Q

Answers

Answer:

C. A musician creates a song using samples of a work and then uses a Creative Commons license to publish the song.

Explanation:

Copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

A copyright can be defined as an exclusive legal right granted to the owner of a creative work (intellectual property) to perform, print, record, and publish his or her work. Also, the owner is granted the sole right to authorize any other person to use the creative work. The copyright law which protects the sharing and downloading rights of music is known as the Digital Millennium Copyright Act (DMCA).

Furthermore, an intellectual property can be defined as an intangible creation of the human mind, ideas, thoughts or intelligence.

In this scenario, a musician creates a song using samples of a copyrighted work and then uses a Creative Commons license to publish the song. This is an action that is most likely to raise legal or ethical concerns because he didn't get a license from the other musicians who he used their work.

A Creative Commons license is simply a public copyright license that allows for the free distribution of a copyright protected material and it can only be used by the intellectual property owner.

HELP HELP BRAINLIEST A student learns that a classmate is being cyberbullied. He wonders if it is a serious situation and how it is affecting his classmate.

What areas of his classmate’s life may be impacted by cyberbullying? Check all that apply.

physical health
recent memories
school performance
emotional health
athletic ability

Answers

Answer:

physical health

school performance

emotional health

5 steps in cleaning and sanitizing smokehouse​

Answers

Answer:

Scrape or remove food bits from the surface. Wash the surface. Rinse the surface. Sanitize the surface. Allow the surface to air-dry.

Explanation: These are steps for cleaning and sanitizing.

The steps in cleaning and sanitizing smokehouse include:

Scrape or remove food bits from the surface.Wash the surface.Rinse the surface.Sanitize the surface.Allow the surface to air-dry.

Sanitization simply refers to the disinfection and cleaning of an area. This is vital on order to prevent humans from being infected or contaminated.

When sanitizing a smokehouse, it's essential to remove food bits from the surface, wash the surface. rinse the surface, sanitize the surface and then allow the surface to air-dry.

Read related link on:

https://brainly.com/question/18996117

Jennifer works as a programmer. She has fixed certain bits of code in a program while developing it. She has purposely left specific code in the program so she can access the program later and obtain confidential information. Which programming threat has she created?
A. logic bomb
B. trap door
C. Trojan horse
D. virus

Answers

Answer:

B. trap door

Explanation:

It's also referred to as the back door

Consider the following numeric values.

Binary 1011
Binary 1101
Decimal 5
Decimal 12
Which of the following lists the values in order from least to greatest?

Answers

Answer:

d 5, b 1011, d 12, b 1101

Explanation:

If you convert the binary, 1011 is 11 and 1011 is 13.

The ordered list of values from least to greatest is Decimal 5, Binary 1011, Decimal 12, and Binary 1101.

Binary refers to the numbers consisting of only "0" (zero) and "1" (one), while decimals are digits from "0" to "9".

In computation, binary numbers are used in order to store any type of data, these numbers consist of binary digits (bits).

A sequence of binary numbers must be read in a digit-by-digit manner, conversely to decimal numbers, which are read by ten, hundred, etc.

The decimal numbers can be estimated as the sum of the binary numbers times their power of 2 (2n).

In conclusion, the ordered list of values from least to greatest is Decimal 5, Binary 1011, Decimal 12, and Binary 1101.

Learn more in:

https://brainly.com/question/16612919

Which term refers to a fact that naturally occurs in the universe?
A.
scientific law
B.
scientific inquiry
C.
conclusion
D.
hypothesis

Answers

Answer: a scientific law

Explanation:

It’s A.Scientific law

Does anyone know how to use a while loop and ask a user to input positive integers until the user enters 0 and print the sum so far after each input, then print final sum at the end in edhesive?

Answers

In python:

total = 0

while True:

   num = int(input("Enter a number: "))

   if num == 0:

       break

   total += num

print(f"The final sum is {total}")

What is an enterprise system

Answers

Answer:

Explanation:

Enterprise system is a cross- functional information system that provides organization-wide coordination and integration of the key business processes. Enterprise system helps in planning the resources of an organization.

1. What is JavaScript?
2. Who designed the Apple 1 Computer?
3. Who founded Apple?

Help me, it would be a pleasure if you could.

Answers

Answer:

1. JavaScript is a dynamic computer language used to primarily code and create system functions.

2. The people who designed the Apple 1 Computer were

Steve WozniakSteve Jobs

3. The founder of Apple was Steve Jobs. He passed away from pancreatic cancer.

Hope this helps you!

HOW MEANY PEOPLE PLAY AMONG US

Answers

Answer:

up to 1.5 million people are playing Amoung Us

Explanation:

Answer: I Play Among Us But this is a website for learning and questions so please ask that somewhere else. Thank You Have A Nice Day!

Explanation:

para saan po yung points dito?

Answers

Answer:

Hindi kudin Alam eh hahahha

Answer:

Hey, there this is the answer

Users need to use points to post a question. The more points they use, the more quickly their question will be answered. Users gain a basic number of points each time they log into the platform.

Which of the following BEST describes the differences between sequential and event-driven programming?

Answers

Answer:

In sequential programming, commands run in the order they are written. In event-driven programming, some commands run in response to user interactions or other events.

Explanation:

Event-driven program : A program designed to run blocks of code or functions in response to specified events.

Sequential programming: The order that commands are executed by a computer, allows us to carry out tasks that have multiple steps. In programming, sequence is a basic algorithm: A set of logical steps carried out in order.

The missing options are;

A) In sequential programming commands run one at a time. In event-driven programming all commands run at the same time.

B) In sequential programming commands run faster than in event-driven programming.

C) In sequential programming each command is run many times in sequence. In event-driven programming all commands are run a single time as an event.

D) In sequential programming commands run in the order they are written. In event-driven programming some commands run in response to user interactions or other events.

This question is about sequential programming and event-driven programming.

Option D is correct.

To answer this question, we need to first of all define what the two terminologies in computer programming are;

Event-driven programming; This is a programming pattern whereby the program flow is determined by a sequence of events that arise from activities/interaction of the user or the system.

Sequential programming: This is a programming pattern whereby the program flow is determined by the sequence in which it was written.

Looking at the given options, the only one that fits perfectly into the description I have given above about sequential and event-driven programming is Option D.

Read more at; brainly.com/question/17970226

Jeff took a picture of his dog that he wants to include in his paper titled “Rescue Dogs of Florida.” What tab should Jeff choose to place the picture in his document?

Home
Insert
Layout
View

Answers

Insert use the insert tab then click pictures and insert pic

Answer:

insert

Explanation:

In most presentation software, custom animations are added from the _____.

Slide pane
Normal view
Task pane
Insert menu

Answers

Answer:

Explanation:

the answer is.....normal view

Answer:

Task pane is the answer

Explanation:

people with healthy media diets:
A.do not have problems with addictions, obesity, or other health issues
B. make good choices about what media to use and when not to use them
C. do not eat while engaging in media and avoid unnecessary weight gain
D. choose to leave media and technology out of their lives entirely

Answers

Answer:

b

Explanation:

Which type of document would be best created in Word? HELLP!!!!
Spreadsheet

Resume

Presentation

Animation

Answers

Answer:

presentation

Explanation:

because maths

Answer:

I think spreadsheet

Explanation:

Please correct me if I am wrong!

Mary is writing an article about the animal kingdom. She wants to place an image below the text. Which menu should Mary choose for this purpose?

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

This question is about how to insert caption or text below the image. Marry have to follow the following steps:

Open the article in MS WordSelect the image to insert the text below it.Then go to the References menuUnder the reference group, click on the insert caption buttona popup, windows will get open, fill in it the required detail.

If you want to insert the image below the text, then you have to follow the following option.

Select the text where you want to insert the imageGo to insert menUnder the Illustration group of menu, click on pictures button, or online pictures button and select the image and click ok.

Mary needs to choose the REFERENCE menu in order to place the text in a desired fashion around the image.

Why is file extension important when naming the file

Answers

Answer:

Extensions are important because they tell your computer what icon to use for the file and what application can open the file

Explanation:  For example, the doc extension tells your computer that the file is a Microsoft Word file.

HERES A RIDDLE!!

What is more useful when it’s broken??

Answers

Answer:

an egg

Explanation:

Which statements describe the use of sound in presentations?

Sound cannot be used in presentation programs.
Sound can distract the audience when it is overused.
Sound can only be used with transitions.
Sound can only be used with animations.
Sound can be used with both animations and transitions.

Answers

Answer:

b and e

Explanation:

The statements that best describe the use of sounds in the presentation are as follows:

Sound can distract the audience when it is overused.Sound can be used with both animations and transitions.

Thus, the correct options for this question are B and E.

What do you mean by Presentation?

The Presentation may be defined as the type of process through which an individual who is known as the speaker conveys information on a particular topic to the number of people known as the audience.

As normally sound makes the presentation more attractive and understandable but the excess sound in the presentation makes the mood of the audience saturated and finally distracts. A standard level of sound must be required in both animations and transitions to make the presentation more influencing one.

Therefore, the correct options for this question are B and E.

To learn more about the Advantages of presentations, refer to the link:

https://brainly.com/question/11972945

#SPJ2

Please help!! Thank youu

Answers

Pinky I think?!!????
i think it’s B: first

because if you’re right handed then it’s most likely for your first finger to touch those highlighted areas!

who presented pakistan resolution​

Answers

Search Results
Featured snippet from the web
Fazlul Huq, the Prime Minister of Bengal, was a formal political statement adopted by the All-India Muslim League on the occasion of its three-day general session in Lahore on 22–24 March 1940.

I got it from google!

what is marc railberts goal for the robots his company (Boston Dynamics) builds?

Answers

Answer:

. We wanted to build a robot that could go where people go

Explanation:

Other Questions
Which one is NOT true about Spanish? All Spanish nouns are either masculine or feminine. When you make a noun plural, the article has to become plural as well. In general, nouns ending in -o are masculine and nouns ending in -a are feminine. There are only two ways to say "the" in Spanish: el & los Please help with these:A: explain the reason so many regional societies wanted to trade with EgyptB: identify five foods or resources that were traded by Egypt C: explain why Egypt was known as the gift of the NileD: how do cataracts impact trade in EgyptE: how do Egyptians view the after life. what effect of using your devce and high sound of volume Given that 7 is a zero of h(x)=x^3-7x^2-3x+21, find the other zeros. Luther believed that women should strive to be?O Models of child care and cookingModels of gardening and plantingModels of obedience and Christian charityO Models of virtue and citenzenship Choose which best describes the following argument:Two flowers of the same species were planted in adjacent plots. The first was fertilized with Miracle-Gro and it flourished. The second was not and it did not flourish, Therefore, Miracle-Gro stimulates plant growth. a. Inductive; weak b. deductive; sound c. Inductive; strong d. deductive; valid How might the descruction of rainforests affect the balance of gases in Earth's atmosphere? I Create a short story using Exploration, Immigrate, Mutiny, Migrate, and revolution.If you don't know the answer please don't answer it. Explain what it means for energy to be conserved. In the current year, Azure Company has $350,000 of net operating income before deducting any compensation or other payment to its sole owner, Sasha. In addition, Azure has interest on municipal bonds of $25,000. Sasha has significant income from other sources and is in the 37% marginal tax bracket.Based on this information, determine the income tax consequences to Azure Company and to Sasha during the year for each of the following independent situations. (Ignore the deduction for qualified business income and the 3.8% Medicare surtax on net investment income.)The rates on qualified dividends are 0%, 15% and 20%.If an amount is zero, enter "0". A convertible is traveling at 45 miles per hour, and its wheels have a diameter of 48 inches. How many complete revolutions do the wheels make in one minute? rev/min Asap, please answer correctly will mark brainliest if correct 2.For example, the earliest humans migrated to the America's by crossing a land bridge at the bering strait during the last ice age.3.Additionally, the oldest known human settlement is found in South America rather than North America ,which is closer to the bridge.How should the underlined word in sentence 3 be changed toprovide a transition from sentence 2?A) NO CHANGEnyB HoweverheThereforetisserD) Meanwhilene I need help just pick one 10pts will mark brainliest first or best response I need two supportive paragraphs on being an officer, use transition words. Due today in 4 hours help public participation reduces the cost of the project and makes best use of available resources present your logic in four point This is for IXLThe floor of a round hut has a radius of 2 yards. What is the floor's area?Use 3.14 for . Please hurry I will give you a thank you and a good rating What physical feature of Greece separated the communities?O mountainslakeshillsOrivers Triangles ABC and DEF are shown above. Write ratio equal to BC/AB. Which trigonometric ratio does this represent? (1 x 1,000,000) + (7 x 1,000) + (2x1,000) + (9 x 100)