1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
postnew [5]
3 years ago
13

9.3 Code Practice

Computers and Technology
2 answers:
Softa [21]3 years ago
7 0

Answer:

import random

numbers = []

for r in range (4):

   numbers.append([])

for r in range(len(numbers)):

   for c in range(5):

       numbers[r].append(random.randint(-30,30))

for r in range(len(numbers)):

   for c in range (len(numbers[0])):

       print((numbers[r][c]), end = " ")

   print("")

Explanation:

ok

julsineya [31]3 years ago
5 0

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

You might be interested in
A. True
svetlana [45]

Answer : True  

Explanation: Vectors can hold, data of the same type and can automatically expand accordingly and change it’s size. The date stored in vectors should be linear.  

- The syntax for vector is vector<int>v;

- Mostly this is used in C++ as an alternative to arrays  

- If you want to use vector in your program then define it in the header first  i.e.

#include <vector>

- Push back is a function, that is used to insert an element into the vector  

- Pop back removes the element from the vector  


6 0
3 years ago
The buttons on a specific tab are organized into logical Ribbons. <br> T<br> F
NeTakaya
I believe the answer would be true
8 0
3 years ago
Read 2 more answers
If you’re presenting in a darkened room, what text and background should you use to provide maximum readability?1) Light text on
ludmilkaskok [199]

Answer:

1

Explanation:

1 because it would be difficult for people to read on the other ones that you put.

3 0
3 years ago
____________ occurs when a provider does not support data export or when a provider's service is unavailable through others.
elixir [45]

Answer:

The correct answer to the following question will be Vendor Lock-In.

Explanation:

Vendor Lock-In: It is also known as Customer Lock-In. The Vendor Lock-In makes the costumer depends on services and products on the vendor. The costumers are not able to use another vendor without changing costs as it creates barriers.

Some ways to avoid Vendor Lock-In, these are as follows:

  • Design your application portable.
  • Keep watching vendor contracts.
  • Arrange both entry and exit with your vendor.

8 0
3 years ago
Match the job roles with their appropriate qualifications. business analyst multimedia artist network and computer systems admin
Tanya [424]

Answer:

business analyst:  degree in business administration arrowRight  

multimedia artist : training in 2D and 3D modeling arrowRight​

network and computer systems administrator: master's course in management information systems arrowRight  

software quality assurance engineer: knowledge of the software lifecycle process arrowRight  

Explanation:

Please check the answer section

6 0
3 years ago
Read 2 more answers
Other questions:
  • There are N bulbs numbered from 1 to N, arranged in a row. The first bulb is plugged into the power socket and each successive b
    6·1 answer
  • The tone a writer takes is referred to as the writing _____.
    7·2 answers
  • A.<br> Post-It note<br> b.<br> notebook<br> c.<br> tutor<br> d.<br> spell check
    14·1 answer
  • To create a cover letter to send to potential employers along with a resume, what software program should you use ?
    6·2 answers
  • Marissa, a 21-year-old young woman, is working as an intern at a software company. She has recently graduated from college. She
    6·1 answer
  • Optimizing a PC’s performance often involves utilities that can defragment disks, clean a system’s Registry, scan for malware, r
    14·1 answer
  • (Convert milliseconds to hours, minutes, and seconds) Write a function that converts milliseconds to hours, minutes, and seconds
    12·1 answer
  • How does technology affect our daily lives essay
    9·2 answers
  • Help me with this two questions please
    15·1 answer
  • Consider a game that is searched using random restart hill climbing strategy. Assume that the success rate for the game is 25%.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!