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
Outline the steps for logging into E-mail account​
jekas [21]

Answer:

go to your email service provider, type in your username(email) and password click the log in or sign in button to continue

7 0
2 years ago
Quantas calorias os adolescentes devem consumir diariamente?
Tema [17]

Answer: los niños requieren un promedio de 2.800 calorías por día, las niñas requieren un promedio de 2.200 calorías por día.

Explanation:

6 0
3 years ago
Class C Airspace inner ring begins at the __________ and extends vertically (by definition) to MSL charted values that generally
ivolga24 [154]

Answer:

5 nautical mile

4000 feet

1200 feet

Explanation:

Class C Airspace has inner ring which is also an inner core has usually 5 nautical mile radius. This extends from surface area upto 4000 feet above airport elevation and outer ring starts at an altitude of 1200 feet above ground and is extended upto 4000 feet above airport elevation.

5 0
3 years ago
Answer this crossword for brainliest and 15 points
nordsb [41]

Answer:

I like ur cut G

Explanation:

6 0
3 years ago
Allow the user to enter a series of temperatures in degrees Celsius (C) ter-
adoni [48]
The flow chart would go:

----------------------------
Start

Input C (Celsius)

IF C = -999 THEN END

Calculate F (Fahrenheit) using the formula

Output F

Goto next temperature (Input C)
----------------------------

The above needs tidying up and coding in the computer language you are using.
5 0
4 years ago
Other questions:
  • How do smart watches affect the business and its position in the global marketplace?
    12·2 answers
  • Why would the filename minutes from the meeting not be a good file name choice
    14·1 answer
  • Which of the following are personal video journal entries posted on the web? Select one: A. Podcasts B. Vlogs C. Blogs D. Newsgr
    14·1 answer
  • The variety of theatre introduced in the 1960s that denotes semi-professional or even amateur theatre in the New York/Manhattan
    11·1 answer
  • Sandra is having difficulty with her reading assignment because she does not fully understand the language. Which online tool wo
    6·1 answer
  • Write any three type of looping structure with syntax​
    13·1 answer
  • The long-run average cost curve is typically _______________________. a) downward-sloping at first but then b) upward-sloping up
    14·1 answer
  • What is the purpose of the GETPIVOTDATA function?
    13·2 answers
  • Write a static generic method PairUtil.minmax that computes the minimum and maximum elements of an array of type T and returns a
    7·1 answer
  • What website or search engine that helps people find the web pages that they are looking for by tying in the subject they want?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!