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
Write the function mystrchr(). the function has two parameters: a const char * s pointing to the first character in a c-style st
GrogVix [38]
<span>c. return a pointer to the first appearance of c appearing inside s and nullptr (0) if c does not appear inside s.</span>
7 0
3 years ago
Were is the hype house
balandron [24]

Answer:

LA

Explanation:

where the rich people live

8 0
3 years ago
Read 2 more answers
Write a single statement that assigns avg_sales with the average of num_sales1, num_sales2, and num_sales3.
sammy [17]

Answer:

Explanation:

try numpy:

import numpy as np

print(np.average([3, 4, 8]))

output:

5.0

3 0
3 years ago
Is techonology better? Lot of votes needed.
Nataliya [291]
In some ways yes but others... not so much. we have access to amazing things that can help so many people and some are tearing people apart or are used for illegal things. its really everyone's own opinion because of some interactions (positive or negative) that can influence them.
5 0
3 years ago
A(n) _______________ CRM provides all users with the tools and information they need to fit their individual roles and preferenc
fgiga [73]
A(n) "Portal-based" CRM provides all users with the tools and information they need to fit their individual roles and preferences.
4 0
3 years ago
Other questions:
  • What type of device is built into a tablet computer and can send data over radio waves to another device such as a laser printer
    10·1 answer
  • Which is the quickest way to change the font color in multiple, randomly located cells in a worksheet
    8·2 answers
  • If you want to emphasize the Greek root of a word in a document, which tool in Microsoft® Word could you use?
    6·2 answers
  • Hey does anybody know how to delete history on a school-issued chrome book, I tried to delete it but it won't let you clear your
    7·1 answer
  • Once secured a wheelchair may move up to 6 inches in any direction
    6·1 answer
  • Do yall think I should be lonely and quit life!!
    8·2 answers
  • Every single device can be connected to every other device on network, making the network mesh. This statement is True or False?
    8·1 answer
  • Which group scope can be used to assign permissions to resources only in the domain in which the group is created
    12·1 answer
  • A financially stable person is able to:
    8·1 answer
  • Since the size of cache is always smaller than the size of the main memory, the sum of bits of the offset and index of a cache w
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!