Answer:
I have Lamborghini Centenario as my profile pic. :)
Explanation:
A) operating system
It is going to let you "operate" it using the mouse and keyboard
Answer:
Option 4: Different programming languages are better for different functions, and new programming languages are being written all the time.
Explanation:
All programing languages are best in their own perspective. Some are easy to handle while other have a smart but tricky context. Therefore different languages are suitable for different functions.
Functional Programming is the term depicting the modularity of code. In actual, it deals the data and functions as immutable. Which means the program state is never changed, the data you pass into the function is returned in a transformed form but actual data is not changed. Not all languages offer functional programming, the top languages which are better with such features are:
- Java Script
- Python
- C++
Moreover, new programming languages are being written for more and more convenience and ease. They are being introduced day-by-day because:
- There is a need of new features.
- Flaws in previous languages.
- More functionality is needed in smaller time.
- Code needs to be more and more smaller.
Answer:
import random
def grid_maker(x, y):
return [ [str(random.randint(-30, 30)) for _ in range(x)]for _ in range(y) ]
print ('\n'.join(' '.join(row) for row in grid_maker(4, 5)))
Explanation:
We use a template function and we generate numbers between -30 and 30:
>>> [str(random.randint(-30, 30))]
We also use the str() method so we can later concatenate the integers with \n. If you do not specify the integers, it will cause a crash. Also, keep in mind if we use a variable to store the integers, it will come out more of like a seed than a random grid. For instance, output without the random integers in a variable:
-12 16 -18 -3
7 5 7 10
18 -21 -16 29
21 3 -4 10
12 9 6 -9
Vs with a variable:
-25 6 -25 -20
-25 6 -25 -20
-25 6 -25 -20
-25 6 -25 -20
-25 6 -25 -20
Next we specify the x and the y:
>>> for _ in range(x)]for _ in range(y) ]
Next we just print it and create a new line every time a row is made
hope this helped :D