The team captain decided to hold an in-person meeting. Write a function that takes in the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The team captain decided to hold an in-person meeting. Write a function that takes in the name of the invitee, day of the week, time of a day and a name of the captain, as strings. It then returns an invitation as a string. Assume all inputs are valid and they might be empty strings, but you do not need to make a separate case for them. When you print the returned string to the console, it should look like this: Dear <name>, Please join our meeting on <day of the week> at <time>. Team captain: <captain name> Notes: 1. The token <BLANKLINE> in the doctest denotes a blank line in the output. You should not append this token in the returned string. You should always add this token in your doctest if you expect the output to have a blank line, instead of just hitting the Enter key; 2. To achieve this, try to search how to change to a new line in a string; 3. Note in the doctest we are printing the results returned from the function, so you should not have print() statements in the function; 4. If you find your answer exactly the same as the expected answer but the doctest fails, try to check extra whitespaces. def message(invitee, day, time, captain): www >>>print(message ("Freya", "Friday", "4:00 PM", "Marina")) Dear Freya, Please join our meeting on Friday at 4:00 PM. <BLANKLINE> Team captain: Marina >>>print(message ("Penny", "Monday", "", "Sheldon")) Dear Penny, Please join our meeting on Monday at <BLANKLINE> Team captain: Sheldon www The team captain decided to hold an in-person meeting. Write a function that takes in the name of the invitee, day of the week, time of a day and a name of the captain, as strings. It then returns an invitation as a string. Assume all inputs are valid and they might be empty strings, but you do not need to make a separate case for them. When you print the returned string to the console, it should look like this: Dear <name>, Please join our meeting on <day of the week> at <time>. Team captain: <captain name> Notes: 1. The token <BLANKLINE> in the doctest denotes a blank line in the output. You should not append this token in the returned string. You should always add this token in your doctest if you expect the output to have a blank line, instead of just hitting the Enter key; 2. To achieve this, try to search how to change to a new line in a string; 3. Note in the doctest we are printing the results returned from the function, so you should not have print() statements in the function; 4. If you find your answer exactly the same as the expected answer but the doctest fails, try to check extra whitespaces. def message(invitee, day, time, captain): www >>>print(message ("Freya", "Friday", "4:00 PM", "Marina")) Dear Freya, Please join our meeting on Friday at 4:00 PM. <BLANKLINE> Team captain: Marina >>>print(message ("Penny", "Monday", "", "Sheldon")) Dear Penny, Please join our meeting on Monday at <BLANKLINE> Team captain: Sheldon www
Expert Answer:
Answer rating: 100% (QA)
Heres is the Python function as per your requirements def messageinvitee day time captain ... View the full answer
Related Book For
Project Management A Systems Approach To Planning Scheduling And Controlling
ISBN: 9781119165354
12th Edition
Authors: Harold Kerzner
Posted Date:
Students also viewed these programming questions
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Vicky's income for 2020-21 consists of her UK salary of 50,270 and rents from overseas property (net of 30% withholding tax) of 3,500. Vicky is UK resident in 2020-21 and she is not a Scottish...
-
Let p denote the statement "Ozone is opaque to ultraviolet light," and let q denote the statement "Life on Earth requires ozone." Write the following statements as English sentences: (a) p q (b) (p ...
-
You are planning your retirement in 10 years. You currently have $60,000 in a bond account and $230,000 in a stock account. You plan to add $9,000 per year at the end of each of the next 10 years to...
-
Which two types of intellectual property potentially last indefinitely? For the remaining two types that do not last indefinitely, how long do they last? Which types of intellectual property, if any,...
-
A citys road maintenance department received donations of two types of assets: 1. From the county in which the city is located it received earthmoving equipment. The equipment had cost the county...
-
Question 2) Suppose there were an alternative replacement machine that could do the same job as the new stamping machine under your consideration in Question 1. The alternate choice offers the...
-
A periodic signal x[n] of fundamental period N can be represented by its Fourier series If you consider this a representation of x[n] (a) Is x 1 [n] = x[n N 0 ] for any value of N 0 periodic? If so...
-
On August 31, the balence sheet of Whispering Winds Corp. showed Cash s10,000, Accounts Receivable $2,700, Supples $600, Equipment $6,000, Accounts Payable $4,600, Common Stock $13,950, and Retained...
-
The Global Division of Station Depot has invested capital of $920,000. If residual income is $4,600 and net operating profit after taxes is $69,000, how much is the cost of capital?
-
Prepare an amortization table in excel based on the following: 1-A $1,000,000 investment is made using $300,000 of your savings and by taking out a loan for $700,000. The loan is for 30 years and...
-
Peter opened a brokerage account to sell short 1,200 shares of Carb Farm stock at the current market price of $160 per share. The brokerage firm charges 12% per annum on the margin loan. a. Suppose...
-
An investment of $ 40,000 is estimated to yield $ 43,000 at the end of the first year, $ 79,000 in the middle of the second year and $ 24,000 at the end of the second year. The return requirement for...
-
D Question 1 THE CONSUMER CITY - MONOPOLY Paige initially has the only license to operate a bookstore in the city. Therefore, she behaves like a monopoly and faces A demand of P-300-Q A Total cost of...
-
Document the role of enzymes in the production of, or as active ingredients in, these products: 1.Dietary supplements that combat intestinal gas (Beano, for example) 2.Laundry detergents (those with...
-
For Problem estimate the change in y for the given change in x. y = f(x), f'(12) = 30, x increases from 12 to 12.2
-
Because of the individuality of people, there always exist differing views of what management is all about. Below are lists of possible perspectives and a selected group of organizational members....
-
What is an effective working relationship between project managers themselves?
-
Metrics are designed to: A. Keep stakeholders informed B. Portray a clear and truthful representation of the project C. Provide information for informed decision-making D. All of the above
-
Consider the data file mroz on working wives and the model \(\ln (W A G E)=\beta_{1}+\beta_{2} E D U C+\) \(\beta_{3} E X P E R+e\). Use the 428 observations on married women who participate in the...
-
Problem Decide whether the sampling method is independent or dependent. Then determine whether the response variable is qualitative or quantitative. (a) Joliet Junior College decided to implement a...
-
Using the data from Table 2, construct a \(95 \%\) confidence interval estimate of the mean difference, \(\mu_{d}\). By Hand Approach Step 1 Compute the differenced data. Because the sample size is...
Study smarter with the SolutionInn App