Reference no: EM13825406
PROGRAM A:
This program should use a main function and another function named makelist as follows:
in main, generate a random integer that is greater than 5 and less than 13.
print this number on its own line.
call the makelist function with the random integer as sole argument.
inside the makelist function:
make an empty list.
use a loop to append to the list a number of elements equal to the random integer argument. All new list elements must be random integers ranging from 1 to 100, inclusive. Duplicates are okay.
return the list to main.
back in main, catch the returned list and sort it.
finally, use a for loop to display the sorted list elements, all on one line, separated by single spaces.
PROGRAM B:
Use the text file named scores.txt (supplied). It contains a number of integer test scores, one per line. Your program should use a main function and another function named showscores as follows:
in main, create an empty list.
open the file named scores.txt.
use a while loop that can detect the end of file to read the scores, and add them to the list.
close the file.
call the showscores function with the list of scores as sole argument.
inside the showscores function:
process the list of scores. NOTE: your instructor will use a modified version of scores.txt with different scores and a different number of scores. Your code should be capable of handling this.
print out the average score accurate to two decimal places.
Discuss how tirgaran ltd should account for these costs
: Discuss how Tirgaran Ltd should account for these costs. Provide journal entries with an explanation of why these are the appropriate entries
|
Raise money for the event
: Every runner is required to solicit sponsors to help raise money for the event. There are two types of sponsors - corporate and personal.Design a second table that will store data about the sponsors for each runner.1.Make a list of the field names an..
|
File sharing program
: Explain what your process was and how the experiment went. Were you successful? What did you learn from the experience ?Experiment choice #1: File Sharing Program Download a current version a file sharing program such as BitTorrent and use it to dow..
|
Law of death penalty in the united states
: The US Supreme Court has often dealt with the question of whether the death penalty is cruel and unusual punishments, sometimes seeming to hold that it is cruel and unusual punishment and sometimes seeming to hold that particular ways of administe..
|
Print out the average score accurate to two decimal places
: print out the average score accurate to two decimal places.
|
What type of noncash scheme is baker most likely
: Baker is an auditor for ABC Company. As part of a proactive fraud audit (using CAATs), Baker runs the following tests: (1) a review of the sales register for dormant customer accounts that posted a sale within the last two months; Taken together, wha..
|
How protocols support business processes
: Define upper layer applications.Explain how the application layer manages distributed applications and their protocols.Describes the application protocols associated with these services
|
Discuss the role of an accountant in a business organization
: Discuss the role of an accountant in a business organization
|
Explian about a firm operating monopolistically in a market
: The problem belongs to Economics, mainly to Micro-economics and it converse about a firm operating monopolistically in a competitive market ends up with super-normal profit with advertisement.
|