Ashy A.

asked • 10/23/20

computer science question

Assume that you have a variable called line that will take on the values 1, 2, 3, 4, and so on, and a class constant named SIZE that takes two values. You are going to formulate expressions in terms of line and SIZE that will yield different sequences of numbers of characters. The first row is filled in for you as an example. Fill in the solution boxes below, indicating an expression that will generate each sequence. Your answers must be in the exact format 'coefficient1 * line + (coefficient2 * SIZE + offset)' 


problem 1

line value: 1,2,3,4,5,6

SIZE value: 3,5

Number of characters: 13, 17, 21, 25, 29, 33 (for 3); 19, 23, 27, 31, 35, 39 (for 5)

Expression: ?


prob 2

line value: 1,2,3,4,5,6

SIZE value: 4,9

number of characters: 10, 9, 8, 7, 6, 5 (for 4); 20, 19, 18, 17, 16, 15 (for 9)

Expression: ?

1 Expert Answer

By:

Patrick B. answered • 10/23/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Getayawkal S.

that is wrong because -1*line + 20 for line 1 is 19 but the first one is 20 then 19
Report

04/10/21

Getayawkal S.

the pattern is 20,19,18. 20 being the first
Report

04/10/21

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.