subject

Write a program to test the functions described in exercises 23 and _26_ of this chapter. instructions for exercise 23 and exercise 26 have been posted below for your convenience. exercise 23 write the definition of a void function that takes as input an integer and outputs two times the number if it is even; otherwise it outputs five times the number. exercise 26 write the definition of a void function that takes as input two integer values, say n and m. the function returns the sum and average of all the numbers between n and m (inclusive).test caseincompleteinput / output test 1test case1input258output results4266.5test caseincompleteinput / output test 2test case 2input51020output results2516515

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Write a function processpeople() that takes the name of a file as a parameter. each line of the file corresponds to information about a person. in particular a line contains either a name (in the form lastname,firstname with no spaces in it) or a name (lastname,firstname) and a year. the function will process the file, creating a person object for each line in the file. the function will print information about each line as it processes it, as well as appending the new person object into a list. make sure to use person methods to display information rather than recreating the work you did for the first problem. once the entire file has been processed, the function returns the list of person objects created from the file. if the file is empty, the function should return an empty list. if the input file cannot be opened, the function should print a message to that effect and then return an empty list. the following shows what would be displayed for two example files which have been provided in the link. the file none.txt does not exist. note that your function must work on an arbitrary file that consists of valid lines. you cannot assume anything about the file except that it contains lines that have the format described above.
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Consider jasper’s balance sheet. which shows how to calculate jasper’s net worth?
Answers: 1
question
Computers and Technology, 25.06.2019 03:10
Write a program to convert a person's height in inches into centimetres #and their weight in stones into kilograms. (1 inch = 2.54 cm and 1 stone = 6.364 kg)
Answers: 1
You know the right answer?
Write a program to test the functions described in exercises 23 and _26_ of this chapter. instructio...
Questions
question
Biology, 05.10.2019 22:30
Questions on the website: 13722362