An array is an indexed collection of data elements. First you must declare an array, give its name and data. <span>Once your arrays are declared, you access the elements in an array with the array name, and the index number inside brackets [ ].
So, in every </span><span>programming language, when you access data stored in an array, you must use a command [] (brackets) containing a value that accesses memory occupied by the array.</span>
Answer:
The solution code is written in Python
- def largerThanN(myList, n):
- output = ""
-
- for x in myList:
- if(x > n):
- output += str(x) + " "
-
- print(output)
-
- l = [5, 12, 11, 4, 56, 32]
- n = 15
- largerThanN(l, n)
Explanation:
Firstly, create a function largerThanN that accepts two arguments, a list (myList) and a number (n) (Line 1).
Next, create a output variable to hold the string of numbers in the list that are greater than the input number n (Line 2).
Create a for loop to traverse through each number in the list and then check if the current x is bigger than n. If so concatenate the x to output string along with a single space " " (Line 4 -6)
After the loop, print the output string (Line 8)
We test the function by using a sample list and n = 15 (Line 10 - 12). The program will display 56 32 .
Answer:
what langunge is that vietname?
This is called text wrapping
Answer:
Register-it contains all the instructions that are present in the processor.
Memory location- it is the particular memory address where the data is stored.
Explanation: Difference between register and memory location are as follows :-
- Register are the found in the CPU internal storage and memory location is present on the RAM.
- Registers are faster in movement as compared to the memory location.
- Register has the capacity of holding of less data as compared to the memory location which can store data in large amount .