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
ycow [4]
3 years ago
7

Write a list comprehension statement to generate a list of all pairs of odd posi

Computers and Technology
1 answer:
egoroff_w [7]3 years ago
7 0

Answer:

Print([(a,b) for a in range(10) for b in range(10) if (a < b and a%2 == 1 and b%2 == 1)])

Explanation:

Here, we declared a range of value for a and b using a for loop and the range function. The values are the first 10 numeric digits. The we used the if statement to establish our constraints;

In other to ensure that ;

Lower digit is written first ; (a < b) ;

Only odd numbers are considered,

a%2 == 1 ; b%2 == 1 (remainder when a and b are divided by 2 is 1.

Both a and b are declared as a tuple in other to obtain a pair of odd values.

You might be interested in
Consider the following instructions for a game element: Move Forward If not at end, move forward Else stop This is an example of
xz_007 [3.2K]

Answer:

C.

Explanation:

8 0
2 years ago
What acronym describes networked devices that contain microcomputers but are not thought of as computing devices, such as refrig
vivado [14]
The acronym RFID (Radio Frequency Identification) describes networked devices that contain microcomputers but are not thought of as computing devices, such as refrigerators, automobile components, light bulbs, and industrial control devices. RFIDs are  battery-powered sensors that gather and transmit data to a reading device. Some sensor based technologies are  scanning electron microscopes, LiDAR,radar, GPS, x-ray, sonar, infrared and seismic.



5 0
3 years ago
your manager asks you to set up a secure network connection at a remote site to move over some backups which protocol would you
nlexa [21]

The protocol that should be used for establishing a secure network connection is SSH.  

The following information is to be considered:  

  • SFTP is secure also it is a protocol for file transferring that applied SSH.
  • IP, FTP, and DHCP should not be for safety purposes as they are not secure.
  • SSH is a secured connection for the remote sites so here the SSH protocol should be used.

Therefore we can conclude that The protocol that should be used for establishing a secure network connection is SSH.

4 0
2 years ago
/*this function represents
sergey [27]

anything

Explanation:

I know what to say this time

7 0
3 years ago
Read 2 more answers
The purpose of this assignment is to determine a set of test cases knowing only the function’s specifications, reported hereaf
Nesterboy [21]

Answer:

The program is written using PYTHON SCRIPT below;

N=int(input(" Enter number of Rows you want:"))

M=[] # this for storing the matrix

for i in range(N):

l=list(map(int,input("Enter the "+str(i+1)+" Row :").split()))

M.append(l)

print("The 2D Matrix is:\n")

for i in range(N):

print(end="\t")

print(M[i])

W=[] # to store the first non zero elemnt index

T=[] # to store that value is positive or negative

L=len(M[0])

for i in range(N):

for j in range(L):

if (M[i][j]==0):

continue

else:

W.append(j) # If the value is non zero append that postion to position list(W)

if(M[i][j]>0): #For checking it is positive or negative

T.append(+1)

else:

T.append(-1)

break

print()

print("The first Non Zero element List [W] : ",end="")

print(W)

print("Positive or Negative List [T] : ",end="")

print(T)

Explanation:

In order for the program to determine a set of test cases it takes in input of 2D matrix in an N numbet of rows.

It goes ahead to program and find the column index of the first non-zero value for each row in the matrix A, and also determines if that non-zero value is positive or negative. The If - Else conditions are met accordingly in running the program.

5 0
2 years ago
Other questions:
  • Janelle is organizing an outline for an investigative report about the benefits of taking a 30-minute walk each day. which of th
    11·2 answers
  • Finding information on the web was made easier by _____________, which provide on-screen menus, making navigation of the web as
    12·1 answer
  • What tool listed below will be the most useful for developing presentation content?
    10·2 answers
  • How many people watch Anime in the world?
    15·2 answers
  • Why is a DNS cache poisoning attack dangerous? Check all that apply. A. Errrr...it's not actually dangerous. B. It allows an att
    12·1 answer
  • In the lan protocol architecture the _________ layer is responsible for detecting errors and discarding any frames that are in e
    13·1 answer
  • What is the difference between an electronic notebook and electronic flash cards?
    8·1 answer
  • Which elements are in the Sort dialog box? Check all that apply.
    9·1 answer
  • Which of the following is the term for a device (usually external to a computer) that is plugged into a computer's communication
    7·1 answer
  • What is the final gear reduction of a compound gear reduction of 36 to 12 for the first stage and 60 to 12 for the second stage?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!