Computers and Technology
Computers and Technology, 11.04.2020 04:46, twixer29

Consider the following two implementations of the same algorithm, each written in a different language.
Language A: Calculate the average daily rainfall for the week (averageRainfall) by adding together the rainfall totals for each of the 7 days of the week (sun, mon, tue, wed, thu, fri, and sat) and dividing the sum by 7.
Language B: Take the total amount of rain from each day of the week (sunday, monday, tuesday, wednesday, thursday, friday and saturday) and then average them together to get the average daily rainfall for the week (averageRainfall).
Which of the following statements about these two implementations is true?
1. Language A is ambiguous because it is unclear what sun, mom, tue, wed, thu, fri, and sat refer to in context with the problem.
2. The algorithms in both languages are ambiguous because they do not specify the actual values of the seven daily rainfall totals.
3. Language B is ambiguous because the process of "average" is not explained well enough for someone to computationally be able to solve the problem.
4. Neither of these languages is clear enough that a programmer could write a correct solution in a high-level programming language.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 09:50, trenrain
Create a string list. 2. use console. readline() to collect values of firstname, lastname, street, city, state, zip, save them to list. 3. write a simple linq statement, call method uppercasewords() to change first letter to uppercase. 4. create a foreach statment to display the information. public static string uppercasewords(string value) { char[] array = value. tochararray(); if (array. length > = 1) { if (char. islower(array[0])) { array[0] = char. toupper(array[0]); } } for (int i = 1; i < array. length; i++) { if (array[i - 1] == ' ') { if (char. islower(array[i])) { array[i] = char. toupper(array[i]); } } } return new string(array);
Answers: 3
image
Computers and Technology, 25.06.2019 10:50, tsmalls70988
4.9: population write a program that will predict the size of a population of organisms. the program should ask the user for the starting number of organisms, their average daily population increase (as a percentage, expressed as a fraction in decimal form: for example 0.052 would mean a 5.2% increase each day), and the number of days they will multiply. a loop should display the size of the population for each day. prompts, output labels and messages. the three input data should be prompted for with the following prompts: "enter the starting number organisms: ", "enter the daily increase: ", and "enter the number of days the organisms will multiply: " respectively. after the input has been read in successfully, a table is produced, for example: 2 300.0 4 675.0 under the heading is a line of 29 dashes followed by one line for each day, showing the day number and the population at the beginning of that day. input validation. do not accept a number less than 2 for the starting size of the population. if the user fails to satisfy this print a line with this message "invalid. must be at least 2. re-enter: " and try to read the value. similarly, do not accept a negative number for average daily population increase, using the message "invalid. enter a non-negative number: " and retrying. finally, do not accept a number less than 1 for the number of days they will multiply and use the message "invalid. enter 1 or more: ".
Answers: 1
image
Computers and Technology, 25.06.2019 12:10, uwrongboi
Create a function called quadform( ) that takes as input the coefficients of the quadratic equation (a, b,c) and returns the two distinct real roots (x1,x2) as output, if they exist. in addition, the function returns a message (flag) that informs the user if an error occurred when trying to find two distinct real roots. the possible errors are: (1) "only one root is found"; (2) "imaginary roots are found"; (3) "any value of x is a solution"; (4) "no zeroes exist." if no errors occur, then flag should be "no errors".
Answers: 1
image
Computers and Technology, 25.06.2019 16:00, nikkole11
Ahot spot is the a. point that collides with other objects b. point an object spins around when it rotates c. first frame in an animation d. point that creates an object's events
Answers: 1
Do you know the correct answer?
Consider the following two implementations of the same algorithm, each written in a different langua...

Questions in other subjects:

Konu
Mathematics, 10.02.2021 22:30
Konu
Mathematics, 10.02.2021 22:30
Konu
History, 10.02.2021 22:30
Konu
Mathematics, 10.02.2021 22:30
Konu
Mathematics, 10.02.2021 22:30
Konu
Mathematics, 10.02.2021 22:30