Task | Comment | Grade |
---|---|---|
1) Declare an array of any type: explain how to use an array, how to access array elements.Assign values to some of its elements, and use those values display) What are the advantages of an array over ordinary variables | Python again? Well let it be Python. Well described about arrays | 1.4/1.5 |
2) What is **the name** of the array? What will happen if you display this value on the screen? What does `cout<<a+2;`that mean (cout<<a-2;)? If `cout<<a;` displays 4,000, then how much will it be`a+1?` | But this doesn't look like Python anymore, since you started describing Python - it should be pointed out that this cannot be done directly in Python, although something could be done. | 1/1.5 |
3) Can an array have two dimensions? | ok | 1/1 |
4) Write a random number in the variable k. `int k=(rand()%101) * (rand()%101) * (rand()%101)+500;` Try to solve the task of finding divisors from the last lesson more efficiently (so that the divisors are found faster) and write the results (not on the screen) but in an array. _Since the transfer of arrays to a function is not a simple topic - filling the array should not be done in the form of a function!!!_ | And why is it effective to search to the root of a number, and not further? And it would be worth organizing the result, not sorting - but ordering. A very brief description of the task, and why did you decide to sort? | 0.9/2 |
5) Fill the array with 55 numbers with random numbers from 10 to 50. If there is a number 37 among the elements of the array, print it `yes`, and if there is no such number, print it `no` | Very brief, explanation, it's just a description of the condition in your own words. | 0.3/1 |
6) Fill an array of 66 numbers with random numbers from 12 to 60. Replace even elements with 7 and odd elements with 77 | Again, very brief, explanation, it's just a description of the condition in your own words. | 0.3/1 |
7) Fill the array of 77 numbers with random numbers from 102 to 707. Find the two largest numbers. But the phrase "the two largest numbers" can have many interpretations. Therefore, first explain well how this phrase was understood. And then solve the problem. | Very short explanation, First you should clearly explain what you mean by "two different largest", explain the main problem, the main idea. And regarding the code - what will this code say if the array contains only -5, or for example numbers less than -127 | 0.9/2 |
Total: | 5.8/10 |
RE: SLC21 Week2 - Programmin arrays
You are viewing a single comment's thread from:
SLC21 Week2 - Programmin arrays