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]
2 years ago
13

9.3 Code Practice

Computers and Technology
2 answers:
Softa [21]2 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]2 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(n) _____ is a local connection point-of-presence that connects a variety of high-performance networks, and its main function i
kirza4 [7]

Answer:

GigaPOP

Explanation:

<em>A gigabit point of presence, also known as GigaPOP is a single entry point to Internet2, which is a high-speed IP network managed by institutions and other organizations. Gigabit Points of Presence generally handle data transmission rates of one gigabit per second or more.</em>

8 0
1 year ago
Which statement about intellectual property is true? (CSI-7.6) Group of answer choices It is okay to use code you find on the in
nika2105 [10]

Answer:

Laws are in place to cover your creative work, which includes code you have written.

Explanation:

Copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

A copyright can be defined as an exclusive legal right granted to the owner of a creative work (intellectual property) to perform, print, record, and publish his or her work. Also, the owner is granted the sole right to authorize any other person to use the creative work.

For instance, copyright law which protects the sharing and downloading rights of music is known as the Digital Millennium Copyright Act (DMCA).

An intellectual property can be defined as an intangible and innovative creation of the mind that solely depends on human intellect.

Simply stated, an intellectual property is an intangible creation of the human mind, ideas, thoughts or intelligence. They include intellectual and artistic creations such as name, symbol, literary work, songs, graphic design, computer codes, inventions, etc.

Hence, laws are in place to cover a person's creative work, and it includes code he or she have written.

6 0
3 years ago
To insert a new slide, which tab option should you select?
jek_recluse [69]

Ithink that the answer is C)

4 0
3 years ago
Read 2 more answers
You are an inventor. You are taking out an ad in a newspaper because you want people to buy/use your product/invention. Include
goldenfox [79]
The light bulb is important because it helps you see in the dark.

The light bulb is a round object that produces light from energy.

People can't live without the light bulb because it helps you out a lot such as see in the dark like when you do homework at night.

It could help businesses profit because many will want to buy it cause they can be cheap but many will sell and it could help you a lot!
4 0
3 years ago
The publisher tab in the application control allows you to manage the various certificates that are used to do what to binaries?
artcher [175]

The publisher tab in the application control allows you to manage the various certificates that are used to sign to binaries. Publisher allow executables of a particular vendor, signed by a security certificate issued to the vendor by a Certificate Authority. Also, all applications and binary files either added to or modified on an endpoint that are signed by the certificate are automatically added to the whitelist.

3 0
2 years ago
Other questions:
  • Hardy doesn't have access to a work template, which is on the network server. What should he do?
    14·1 answer
  • 14. Convert 11110111 from binary to denary<br> (1 Point)
    12·2 answers
  • How can I code this in Python with only if-statements? (Only allowed to use the built-in functions int(), float(), and str().)
    8·1 answer
  • Clearing the computer's cache helps store recently-used information.
    8·1 answer
  • Which programming element is used by a game program to track and display score information?
    10·2 answers
  • Which job role requires you to create user guides for computer products and services?
    11·1 answer
  • Evaluate a career in the telecommunications industry that most interests you. What about the career appeals to you?
    8·1 answer
  • ________ take advantage of vulnerabilities in software. Group of answer choices Blended threats Bots Trojan horses Direct-propag
    6·1 answer
  • ________ is the general name for a security flaw in a program. Group of answer choices A security fault A virus Malware A vulner
    13·1 answer
  • Why do relational databases use primary keys and foreign keys?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!