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, 21.06.2019 23:30
Show that there is a language a ⚆ {0, 1} â— with the following properties: 1. for all x â a, |x| ≤ 5. 2. no dfa with fewer than 9 states recognizes a. hint: you don’t have to define a explicitly; just show that it has to exist. count the number of languages satisfying (1) and the number of dfas satisfying (2), and argue that there aren’t enough dfas to recognize all those languages. to count the number of languages satisfying (1), think about writing down all the strings of length at most 5, and then to define such a language, you have to make a binary decision for each string about whether to include it in the language or not. how many ways are there to make these choices? to count the number of dfas satisfying (2), consider that a dfa behaves identically even if you rename all the states, so you can assume without loss of generality that any dfa with k states has the state set {q1, q2, . . , qk}. now think about how to count how many ways there are to choose the other four parts of the dfa.
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
question
Computers and Technology, 23.06.2019 21:00
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
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
Questions on the website: 13722367