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
skad [1K]
3 years ago
6

. Write a short Python function that takes a sequence of integer values and determines if there is a distinct pair of numbers in

the sequence whose product is odd. (1 Point)
Computers and Technology
1 answer:
lisov135 [29]3 years ago
6 0

Answer:

Explanation:

The following code is written in Python and like requested takes a function called odd_number that takes a list of integers as a parameter. It then loops through the list two times, each time calculating the product of the two numbers and returning Yes if the product is an odd number while also including the two numbers from the list that make that product. If there is no odd product in the list the function simply returns No

def odd_product(my_list):

   for num1 in range(len(my_list)):

       for num2 in range(len(my_list)):

           if num1 == num2:

               pass

           else:

               product = my_list.__getitem__(num1) * my_list.__getitem__(num2)

               if (product % 2) != 0:

                   return "Yes, " + str(my_list.__getitem__(num1)) + " and " + str(my_list.__getitem__(num2))

   return "No"

You might be interested in
What is the left are if a slide in a presentation called
defon

Answer:

A slide pane

Explanation:

a feature available in some programs, usually found on the left side of the window.

8 0
3 years ago
Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
stiks02 [169]

Answer:

I think the answer is option D (double-click Format Painter)

Explanation:

7 0
3 years ago
Hiiiiiiiiihwdawdfgthnythgrfergthyjuhgfd
Lilit [14]

Answer:

Your answer would be gas.

Explanation:

Steam is just water just evaporated.

3 0
2 years ago
Read 2 more answers
Please help me please it's urgent​
il63 [147K]

Answer:

age = input()

if age < 13:

   print("Not allowed")

else:

   print("Allowed")

7 0
3 years ago
To use an imported image, simply drag it from the desktop onto the stage. true or false?
elena-s [515]

Answer:

True

Explanation:

Because i have done it before and it works on an accer

6 0
3 years ago
Other questions:
  • The eastern front was longer than other fronts of the war true or false
    7·2 answers
  • What special member function of a class is called whenever an instance of a class is created and initialized?
    15·1 answer
  • What are the 4-bit patterns used to represent each of the characters in the string "1301"? Only represent the characters between
    14·1 answer
  • Give the appropriate term for each of the following.1. An easy-to-remember address for calling a web page (like www.code.org). 2
    8·1 answer
  • To print a mailing label, click the Labels button on the MAILINGS tab in the ____ group. A. Building Block B. AutoText C. Templa
    10·2 answers
  • Software is nothing but a piece of code or set of instructions written in a chip to run a hardware device on the Computer. O Tru
    14·1 answer
  • If a citation has a volume, title, and page numbers, it is a:
    9·2 answers
  • I WILL GIVS BRAINLIEST IF U ANSWER THIS
    9·1 answer
  • Match the TCP/IP Layer to a problem that can happen there.
    8·1 answer
  • Why aren't my skullcandy bluetooth headphones connecting to my school chromebook if I turned on both the headphones and the blue
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!