edhesive assignment 2: room area?

Answers

Answer 1

Explanation:

a, b, c, d, e = input("A ="), input("B ="), input('C = '), input("D = "), input('E = ')

print(float(a*b + sqrt(c**2-(a/2)**2) * a/2 * 0.5))

Answer 2

a, b, c, d, e = input("A ="), input("B ="), input('C = '), input("D = "), input('E = ') print(float(a*b + sqrt(c**2-(a/2)**2) * a/2 * 0.5))

What is program?

The program is an illustration of functions. Functions are groups 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

#SPJ7

The complete part of the question will be:

Assignment 3: Chatbot

What the code for assignment 3: chatbot Edhesive.


Related Questions

Other Questions
What happens when a current is applied to two electrodes immersed in pure water? A. No electrolysis occurs, and current does not flow. B. Oxygen, but not hydrogen, is released as a gas. C. Electrolysis occurs, releasing oxygen and hydrogen gas. please helpthank you Find the value of Sin^-1(-3/2) The U.S. Department of Agriculture records data on farm acreage and number of farms by county for every county in the country. This takes considerable time and energy, and the results for each update (usually occurring approximately every five years) are a long time in process. A quicker way to update the data is by sampling. The table below shows the number of counties in each geographic region and a summary of farm acres (in thousands) for independent random samples of 22 counties from each region.Region Number of countiesNorth Central 1052North East 210South 1376West 418 Required:a. Estimate the mean acreage for each region, with a margin of error.b. Estimate the total acreage for each region, with a margin of error.c. Estimate the difference between mean acreage for the North Central region and the South, with a margin of error.d. Estimate the difference between mean acreage for the North East and the West, with a margin of error.e. Estimate the mean acreage per county across the United States, with a margin of error. Which are the neighbors of Argentina that are part of the contention for land?Chile and BoliviaUruguay and BrazilUruguay and ParaguayBrasil and Peru How have technology and social media changed reading?O A. Physical books can only be read on the web.B. Now reading is a conversation of give and take.O C. People no longer have to read anything at all.D. Reading often takes much longer to undergo. WILL GIVE BRAINLIEST *NO LINKS* What type of transport is illustrated in the diagram and what type of molecule would be transportedusing this process?A. Passive transport; carbohydratesB. Active transport; oxygenC. Exocytosis; proteinsD. Facilitated diffusion; sugars Inertia best describes...a. why objects at rest remain at restb. why objects moving at a constant velocity continue moving at a constant velocityc. both A and B Plz help solve this please and thx u What does the top-level domain in a URL indicate?A. the organization or company that owns the websiteB. the organization or company that operates the websiteC. the protocol used to access the website D. the type of website the URL points to la web es un nuevo tipo de mundo digital que est en lnea. la web_____ .una densa malla de eslabones atraviesa el planeta para formar un todo organico, una red compartida de ________ abiertas para la exploracin How many molecules of sodium fluoride (NaF) are found in 7.2 moles of sodium fluoride? SegR-7268 Corporation has two divisions, East and West. The following information was taken from last year's income statement segmented by division: East Division West Division Sales $3,700,000 $2,300,000 Contribution margin $1,650,000 $1,000,000 Divisional segment margin $1,100,000 $350,000 Net operating income last year for SegR-7268 Corporation was $600,000. In last year's income statement segmented by division, what were SegR-7268's total common fixed expenses?a. $2,050,000b. $850,000c. $2,300,000d. $1,200,000 Can someone help me with this it is for mathh. PLEASE HELP FAST 30 POINTS! For Trancescient 5x-1/5=7/3 Find The LCD That would eliminate the fractions - 7th Grade Work -Can someone please help me? I really need it. A number divided by four is at most 6. Which choice is correct?? A. K/4 > 6B. 4/k 6C. K/4 6D. K/4 < 6E. K/4 6 do teachers treat students differently based on expectations explain why