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
Devices which are used to receive data from central processing unit are classified as
denis23 [38]

Answer:

Input devices are used to receive data from central Processing Unit.

Explanation:

7 0
3 years ago
What is Fill handle?
vesna_86 [32]

Answer: I copied and pasted my answer if you need the website to cite information let me know

Explanation:

Fill Handle is a feature in Excel that enables you to auto-complete a list in a row/column by simply dragging it using your mouse. A basic understanding of fill handle in Excel could save you some time and make you more productive.

6 0
3 years ago
Within the sites that support disaster recovery, ___________ is a separate and fully equipped facility where the company can mov
Dahasolnce [82]

Answer:

Hot site.

Explanation:

It seems to be a specific and completely designed functionality inside the sites which assist disaster recovery, in which the organization may travel directly during a disaster as well as continue operations.

  • It may be described as such a recovery site that is repeatedly fully operational.
  • It enables the corporation to resume normal corporate processes during a disaster, within such a limited period cycle.
7 0
4 years ago
In python:
egoroff_w [7]

Python can be used to implement central of tendencies such as mean, median and mode using the statistic module

The program in Python, where comments are used to explain each line is as follows:

#This imports the statistics module

import statistics

#This defines the function that calculates the mode

def calcMode(myList):

   #This prints the mode

   print(statistics.multimode(myList))

#This defines the function that calculates the median

def calcMedian(myList):

   #This prints the median

   print(statistics.median(myList))

#The main method begins here

#This initializes the list

myList = []

#The following iteration gets input for the list

for i in range(10):

   myList.append(int(input()))

#This calls the calcMode method

calcMode(myList)

#This calls the calcMedian method

calcMedian(myList)

Read more about similar programs at:

brainly.com/question/25026386

8 0
3 years ago
What is the purpose of system software?
suter [353]
"To preform specific useful computing tasks, like word processing and calculation" is the correct answer. This is the whole purpose of system software. The third answer is some other type of software(third party software?) and the fourth answer is most likely a compiler. Those are the easiest to take off. The second could also work.

The two answers I would go with are the first and the second.
8 0
3 years ago
Other questions:
  • In what decade did the Internet begin to be used widely by the public and not just government entities?
    5·2 answers
  • What is one example of technology influencing health​
    9·1 answer
  • What is a strictly layered pattern, provide an example of its usage.
    13·1 answer
  • In regard to protective actions for explosive devices, the area where the blast originates is referred to as ___________ perimet
    8·1 answer
  • А.<br> is the highest education degree available at a community college.
    6·1 answer
  • A Chief Information Security Officer (CISO) needs to establish a KRI for a particular system. The system holds archives of contr
    13·1 answer
  • Assume that you want two C# or C++ programs to share some data. You can write the first program so that it writes it's output to
    5·1 answer
  • If the starting address location changes, in which of the following cases, the program has to be recompiled? Select one: a. Both
    12·1 answer
  • What is the output of this program? age=4 if age &gt;5: print (“more”) else: print (“less”)
    7·1 answer
  • Please help me with coding!
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!