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
Vanyuwa [196]
3 years ago
9

Python code 100 Random Numbers (twice)

Computers and Technology
1 answer:
Leona [35]3 years ago
8 0

import random

i = 1

while i <= 100:

   print("#"+str(i)+": "+str(random.randint(1,100)), end=", ")

   i+=1

print()

i = 1

while i <= 100:

   print("#"+str(i)+": "+str(random.uniform(1,100)), end=", ")

   i += 1

I hope this helps!

You might be interested in
How to add if an statemement on a retrun in react js.
miv72 [106K]

Answer:

Of course, if we think about if statement in Javascript or Typescript logic, it’s the same as in every Javascript or Typescript place.

It’s just if/else like pure javascript, but in this case, we won’t talk about the normal if/else.

In react, we’ll need if statements for the one more thing, it’s the rendering.

It’s named “Conditional rendering”, but to make it simple, let’s stay with “if statement in react”.

There are the two most popular ways to use conditional rendering that we’ll see in the React.js code, and depends on a case, both of them are correct.

The first way that we can use is to define the conditional rendering directly in the components layout.

It’s quick and easy that we’ll use the most, and in some cases, it is the best for performance.

We’ll be using this way in the cases when we have only one condition, more just as “if”, when we would like to render some element when a specified condition is passed.

The second way is the function created to handle specified parts of the layout, and render it conditionally, to do that we can use not only if/else but the switch case as well.

This one way is right to use in cases where we have more conditions, especially the version with switch one.

But it fires the function anyway, so it is no sense to use it when we have one condition.

Let’s take a look at the code examples where I added both ways of doing that:

// The first example with the code inside functional component

function Parent(props) {

 return(

   <>

     {name === "Duomly" && (

       <DuomlyComponent/>  

     )}

   </>

 )

}

// The second example with the additional function

function renderComponent() {

 const name = 'Duomly';

 if (name === 'Duomly') {

   return 'Duomly';

 } else {

   return null;

 }

}

function Parent(props) {

 return renderComponent();

}

Explanation:

3 0
3 years ago
Discuss some designs using columns, gutters, text alignment, graphics, etc.
Naily [24]

Answer:

.......

Explanation:

8 0
3 years ago
Discuss similarities and differences between the software development and video game development processes.
Eduardwww [97]

Answer:

video games are used with qraphecs and software is compute

Explanation:

6 0
3 years ago
State one technique for overcoming external fragmentation in dynamic partitioning. Why is this technique of overcoming external
prisoha [69]

Compaction often gives solutions to the issues regarding external fragmentation.

One technique for overcoming external fragmentation in dynamic partitioning is

Compaction.

The reason why this technique of overcoming external fragmentation may be inefficient is because:

  • External fragmentation may need a lot of compaction and it is an expensive operation.

  • The use of contiguous allocation is often hard to fit processes into memory and also it is so difficult to grow or shrink the amount of memory allocated to a process.

  • Compaction only takes place when relocation is dynamic, and this also is expensive.

Compaction often shuffle memory notes or contents and then put or pile them up all in free memory and in one large block.

External fragmentation takes place when free memory is removed into small blocks.

Learn more from

brainly.com/question/23636593

4 0
2 years ago
Which of these is an application? Microsoft Windows Linux Microsoft Word Apple ios​
STALIN [3.7K]

Answer:

I think it's Microsoft windows

8 0
4 years ago
Read 2 more answers
Other questions:
  • If you have cut or copied a set of information, which procedure will NOT work to paste it back into the worksheet?
    14·1 answer
  • What are the stages in the development of a multimedia project?
    6·1 answer
  • Choose the reasons why Windows Server operating systems are a popular choice for a network because they _____. Select all that a
    12·1 answer
  • You don't have policies that force settings for the look of users' computer desktops. Each user's chosen desktop settings are ap
    15·2 answers
  • Which characteristic of a relational database distinguishes it from a flat file?
    5·1 answer
  • If a touch screen chrome is not charging what is wrong with it
    13·2 answers
  • A worksheet can have a maximum of number of rows​
    11·2 answers
  • Tech A states that modern vehicles use asbestos as the brake material. Tech B states that asbestos is no longer used in brakes.
    8·1 answer
  • the first day anna read a quarter of the book. on the second day she read a third of the remainder. noticed that after two days
    12·1 answer
  • Which network protocol is used to handle the reliable delivery of information?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!