Float point numbers

 

1. Compute the average of a list of float point numbers with foldr
*/

//Start = avg [16.2, 17.8, 11.5]//15.1666666666667
//Start = avg [13.0, 40.9] // 26.95
//Start = avg [] // 0

/* 2.
Write a function that takes two integers a and b.
Use iterate to take first a number of elements from the list
which contains the result of b^n (n goes from 0 to a).
Return an empty list for illegal integers a or b.
*/
Start = power 100 0 // []
Start = power 10 2 // [1,2,4,8,16,32,64,128,256,512]
Start = power 15 3 // [1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969]

/* 3.
write a function that takes a list of lists(suppose that there are no empty sublists) and an integer,
do the following operations:
1) select the smallest value from each sublist
2) pick elements from the above resulting list which is smaller than the given integer and is an even number at the same time.
Assume that Real number is even if ‘toInt’ gives an even number.
*/

//Start=select [[3.2,4.9],[2.4,2.4,5.0],[2.2,3.3,4.4],[2.0],[1.3,3.8]] 3 // [2.4,2.2,2]
//Start=select [[5.0,2.5,7.7],[5.0,3.8,2.4],[5.6,7.9,10.76]] 4 // [2.5,2.4]
//Start=select [[3.2,4.9],[3.4,12.4,5.0],[21.2,3.3,4.4],[2.0],[1.3,3.8,7.9]] 3 // [2]
//Start=select [] 1//[]

 

 

 

 

Sample Solution

f the case study, go to the library or search for relevant information on the Internet, or go to the location of the company to conduct on-the-spot exploration and in-depth study of specific issues. Advantages: Specific cases can make the understanding of the theory become sensible and specific, and enable the researchers to fully understand the theoretical understanding. (Byrne& Humble,2007) Disadvantages: the cases themselves are individual cases, and each case has its own characteristics that cannot be duplicated, such as specific time, space environment and so on. The results of case studies are not easy to be generalized and lack of objectivity. 3.4.2 Questionnaire The questionnaire survey method is a method for researchers to collect data, solicit opinions or understand the situation from the target group through questionnaires(Mathirajan,2006). The self-administered questionnaire has the characteristics of standardized access. In this study, the questionnaire will be sent to the trainees. The question revolves around whether they feel that their abilities have improved after being trained. In what ways has it been improved and what has remained unchanged. In this study, questionnaires will be sent to trainees. The questionnaire questions will revolve around whether they feel their abilities have improved after training. Where it has improved and where it has not changed. When designing the questionnaire, take into account the time spent by the interviewees, and the questions should not be too many. During the questionnaire survey, try to increase the number of participants to avoid bias in their opinions. Don’t deal with too sensitive issues so as not to harm the participants’ self-esteem (Menezes, 2012). Why to choose Questionnaire is a survey suitable for this study. First of all, as the time for investigation and analysis is very limited, for trainees, more accurate ideas of trainees is required, so the number of

This question has been answered.

Get Answer
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, Welcome to Compliant Papers.