adamcookie26 adamcookie26
  • 20-11-2020
  • Computers and Technology
contestada

python code 100 Random Numbers (twice)

python code

instructions:
You need to write code that will print two bricks of numbers, one with integers, one with decimals.

Respuesta :

Cytokine
Cytokine Cytokine
  • 20-11-2020

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!

Answer Link

Otras preguntas

What is necessary to convict someone of treason?
Describe the primordial soup theory
What is necessary to convict someone of treason?
Why were roads significant to the roman republic and ancient cultures and religions of the same time period
How did the Stuart rulers of England anger many English citizens with their belief
What are the major effects of the ozone hole?
What is dew point? And how do I use it in a sentence? Do I say, "Then the temperature hit dew point?" because that just sounds wrong to me.Someone please help!
What is the difference between a storyboard and a comic strip?
How did the Stuart rulers of England anger many English citizens with their belief
If you run 6. Miles an hour how long will it take to do 18 miles help quick pls