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
suter [353]
2 years ago
10

Write code that generates a random odd integer (not divisible by 2) between 50 and 99 inclusive.

Computers and Technology
1 answer:
san4es73 [151]2 years ago
8 0

import random

nums = [x for x in range(50,100) if x%2!=0]

print(random.choice(nums))

We use a list comprehension to create a list of the odd numbers between 50 and 99. Then we randomly choose one of those numbers using the random module.

You might be interested in
What is the difference between a switch and a hub?
marta [7]

Explanation:

A hub is used to send the message from one port to other ports.It does not know the specific address of the destination where the message needs to send.it works on Physical layer of the OSI model(layer 1).

A switch can handle data and it knows the specific address of the destination.A switch works on the data link Layer of the OSI model(layer 2).

8 0
2 years ago
100 POINTS. DO NOT SPAM. OR I WILL REPORT.
Dafna1 [17]

Answer:

Explanation:

In digital image processing, degradation is a process of introducing defects to the image. Understanding the degradation function will allow restoration of the original image.

There are many different causes for image degradation such as motion blur, digital noise and lens off-focus. In cases like motion blur, it is possible to come up with an very good estimate of the actual blurring function and "undo" the blur to restore the original image. For digital noise, a statistical model can be set up to compensate for the degradation it caused.  Similarly  lens focus can be compensate by an optical model if the mis-focus is known.

The above are three degradations that I could find. A lot more information can be found about restoration functions. If you search for image degradation online, you will find a discussion on Quora and an interesting introduction from Rice University. Good luck!

4 0
3 years ago
Read 2 more answers
2. Why is there no country code for the USA?
babymother [125]

Answer:

there is a contrary

Explanation:

+1

4 0
2 years ago
Read 2 more answers
Beneficios del reciclaje electrónico
kykrilka [37]

English:

Recycling, in general, is good, it saves space in landfills and prevents pollution. Because some of the materials used to make the electronic piece are made with toxic ingredients its better to recycle them instead of having them end up in our oceans. Also, some pieces of electronics contain valuable metals like gold and copper. These Metals can be reused to make new better electronics with having to use the energy and money to produce new materials  

Español:

El reciclaje, en general, es bueno, ahorra espacio en los vertederos y evita la contaminación. Debido a que algunos de los materiales utilizados para fabricar la pieza electrónica están hechos con ingredientes tóxicos, es mejor reciclarlos en lugar de que terminen en nuestros océanos. Además, algunos componentes electrónicos contienen metales valiosos como el oro y el cobre. Estos metales se pueden reutilizar para fabricar nuevos y mejores productos electrónicos con la necesidad de utilizar la energía y el dinero para producir nuevos materiales.

4 0
3 years ago
I don't understand how to write code for this in Java using nested for loops only. The official question is: write a program tha
Bingel [31]

Answer:

public class Triangle

{

public static void main( String[] args )

{

show( 5 );

}

public static void show( int n )

{

int i,j,k;

for (i = 0; i < n - 1; i++ )

{

for (j = 0; j < i; j++ )

{

System.out.print( " " );

}

for (k = n - i; k > 0; k-- )

{

System.out.print( "* " );

}

System.out.println();

}

for (i = 0; i < n; i++ )

{

for (j = n - i; j > 1; j-- )

{

System.out.print( " " );

}

for (k = 0; k < i + 1; k++ )

{

System.out.print( "* " );

}

System.out.println();

}

4 0
2 years ago
Other questions:
  • April 107 90 29 31 66 0.344
    8·1 answer
  • The program prompts the user to interactively enter eight batting averages, which the program stores in an array. The program sh
    9·1 answer
  • What is the order of arrangement of files and folders on a computer?
    15·1 answer
  • Which tab provides commands for the most commonly used elements in Word software?
    15·1 answer
  • Building relationships during your career exploration is called
    6·1 answer
  • When I try to invite someone to be my friend on brainly, for some people, it says, "Somethings up. Invitation wasn't sent". Can
    8·1 answer
  • What are some good electronics that I can buy on Amazon?
    14·1 answer
  • A tornado destroyed many
    6·2 answers
  • Which of the following is the BEST reason to use cash for making purchases? everfi
    15·1 answer
  • What is microsoft excel​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!