subject

Atriangular number is a number that is the sum of the integers from 1 to some integer n. thus 1 is a triangular number because it's the sum of the integers from 1 to 1; 6 is a triangular number because it's 1+2+3=6. given the non-negative integer n, create a list of the first n triangular numbers. thus if n was 5, the list would be: [1, 3, 6, 10, 15]. associate the list with the variable triangulars.

2. an arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers is the same. this in the sequence 1, 3, 5, 7, the distance is 2 while in the sequence 6, 12, 18, 24, the distance is 6. given the positive integer distance and the non-negative integer n, create a list consisting of the arithmetic progression between (and including) 1 and n with a distance of distance. for example, if distance is 2 and n is 8, the list would be [1, 3, 5, 7]. associate the list with the variable arith_prog.

3. given a variable temps that refers to a list, all of whose elements refer to values of type float, representing temperature data, compute the average temperature and assign it to a variable named avg_temp. besides temps and avg_temp, you may use two other variables -- kand total.

4. a list named parking_tickets has been defined to be the number of parking tickets given out by the city police each day since the beginning of the current year. (thus, the first element of the list contains the number of tickets given on january 1; the last element contains the number of tickets given today.) write some code that associates most_tickets with the largest value found in parking_tickets. you may, if you wish, use one additional variable, k. 5. associate the sum of the non-negative values in the list numbers with the variable sum.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
Hassan is writing his master’s thesis, which is a thirty-page document. he received some feedback from his professor in the form of comments, but does not see where the comments are. what is the fastest way for hassan to find the feedback?
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
You know the right answer?
Atriangular number is a number that is the sum of the integers from 1 to some integer n. thus 1 is a...
Questions
question
Spanish, 07.01.2022 15:10
question
Mathematics, 07.01.2022 15:10
question
Mathematics, 07.01.2022 15:10
question
Mathematics, 07.01.2022 15:10