Write a program that inputs a number for day of the week (e.g. 1 for Monday,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that inputs a number for day of the week (e.g. 1 for Monday, 2 for Tuesday, ., 7 for Friday). The program should print the name of the day and if the user enters a week day, call a function weekday() that prints the schedule for a week day, otherwise call a function weekend() to print the schedule for a weekend day. The functions weekday() and weekend() takes no parameters and returns no value. Sample output1: Enter a day number (e.g.1(Monday), 2(Tuesday)) to display schedule:6 Saturday. Go for a walk. Hang out with friends. Do house chores. Sample output2: Enter a day number (e.g.1(Monday), 2(Tuesday)) to display schedule:2 Tuesday. Go to school. Go to work. Dinner with family. Write a program that inputs a number for day of the week (e.g. 1 for Monday, 2 for Tuesday, ., 7 for Friday). The program should print the name of the day and if the user enters a week day, call a function weekday() that prints the schedule for a week day, otherwise call a function weekend() to print the schedule for a weekend day. The functions weekday() and weekend() takes no parameters and returns no value. Sample output1: Enter a day number (e.g.1(Monday), 2(Tuesday)) to display schedule:6 Saturday. Go for a walk. Hang out with friends. Do house chores. Sample output2: Enter a day number (e.g.1(Monday), 2(Tuesday)) to display schedule:2 Tuesday. Go to school. Go to work. Dinner with family.
Expert Answer:
Related Book For
Statistics Unlocking the Power of Data
ISBN: 978-1118583104
1st edition
Authors: Robin H. Lock, Patti Frazer Lock, Kari Lock Morgan, Eric F. Lock, Dennis F. Lock
Posted Date:
Students also viewed these programming questions
-
Write a program that receives an ASCII code (an integer between 0 and 127) and displays its character. For example, if the user enters 97, the program displays the character a. Here is a sample run:...
-
The number of bills for each day of the week is shown in Table D.6. Does this provide evidence that some days of the week are more popular (have more bills) than others? Table D.6 In Data 2.12 on...
-
The following table summarizes sales by day of the week at a convenience store operated by a major domestic gasoline retailer. The data cover about one year, with 52 values for each day of the week....
-
The English publisher of a book called Cambridge gave a New York publisher permission to sell that book any place in the world except in England. The New York publisher made several bulk sales of the...
-
If a company elects the fair value option for long-term liabilities, can it report unrealized gains and losses in others comprehensive income? Explain.
-
Describe the passing the baton approach to CEO succession. What other methods are used?
-
What is the difference between a predator and a situational (accidental) fraudster?
-
On July 31, 2016, after one month of operation, the general ledger of Michael Domenici, Consultant, contained the accounts and balances given below. ACCOUNTS AND BALANCES INSTRUCTIONS 1. Prepare a...
-
Following are the results from two different simple regression analyses, estimating the costs of the purchasing department using number of purchase orders and number of vendors as potential cost...
-
The results below are based on data collected as part of a student project for an introductory statistics class at UF. If there is more than one group/treatment, the first group mentioned is group 1....
-
An entity manufactures suits, clothing, bed linen, and various cotton and manmade fiber products. It has several segments, which are reported internally as Segment Segments Sales Profit assets Suits...
-
Why are bond ratings important to firms and investors?
-
Does the average investors willingness to take on risk vary over time? Explain.
-
Should companies completely avoid high-risk projects? Explain.
-
Have there been any studies that question the validity of the CAPM? Explain.
-
What do you think the average investors risk perception is now? In what types of investments do you think the average investor is investing currently?
-
Give comprehensive Summary of Labour Laws. Maximum of one paragraph for each topic having six to eight lines. LAW OF LABOUR 26 Industrial Relations 27 Factory Workers 28 29 30 31 Industrial and...
-
An investor sells a European call on a share for $4. The stock price is $47 and the strike price is $50. Under what circumstances does the investor make a profit? Under what circumstances will the...
-
Draw any scatterplot satisfying the following conditions: (a) n = 10 and r = 1 (b) n = 8 and r = 1 (c) n = 5 and r = 0
-
The AllCountries dataset includes land area, in square kilometers, for all 213 countries in the world. The mean land area for all the countries is 608,120 sq km with standard deviation 1,766,860. For...
-
Ask a random sample of students at the library on a Friday night How many hours a week do you study? to collect data to estimate the average number of hours a week that all college students study....
-
Describe the transactions demand and the portfolio demand for money.
-
If velocity were constant at 1.5 while M2 rose from $11 trillion to $12 trillion in a single year, what would happen to nominal GDP? If real GDP rose 2.09 percent, what would be the level of...
-
Explain why key central banks have shifted away from targeting money growth.
Study smarter with the SolutionInn App