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
Trava [24]
3 years ago
12

using a timer to generate a random number, develop a program that displays random numbers between 1 and 47 (or whatever) for you

r state's lottery
Computers and Technology
1 answer:
mestny [16]3 years ago
3 0

Answer:

Explanation:

The following code is written in Python. It creates a variable that detects the current time. Then it loops through a range of numbers and chooses the last random number after 2 seconds. Finally, it prints that number to the screen. This function can be called countless times depending on the number of state lottery numbers needed.

import random

import time

start_time = time.time()

while time.time() - start_time < 2:

   lottery_number = random.randint(0, 48)

print(lottery_number)

You might be interested in
How do I insert a row in between 1 and 2 in excel?
Vlada [557]
This link should help: https://uhasct.com/insert-an-empty-row-between-each-row-of-data-in-excel/
5 0
3 years ago
Read 2 more answers
You’re mapping out the logical relations of a database, and you notice that one of your tables will have a pair of child records
Jet001 [13]
The answer to your question is answer A
3 0
3 years ago
The ________ of a cpu dictates how many instructions the cpu can process each second.
makkiz [27]
Gigahertz is the correct answer I believe.
My processor is a i5-6600k with 3.5ghz so assuming GHz is the speed I believe it would be gigahertz
3 0
3 years ago
how can a user open a blank presentation? 1.on the file menu, click new, and then click recent templates 2.on the file menu, cli
4vir4ik [10]

2.  on the file menu, click new, and then click blank presentation.

5 0
3 years ago
What is a statement that adds 1 to the int j when the int counter has a value less than the int n?
Nikitich [7]
I think the answer is n combination r or n permutation r.
Please mark me as brainliest.
5 0
3 years ago
Other questions:
  • What does a file extension tell you?
    14·1 answer
  • A group of users can perform certain operations on a shared workbook. Which option helps them to update and track changes in the
    14·1 answer
  • A ______ connection provides fast internet service and the ability to exchange large files. ​
    11·1 answer
  • Write a program that reads a stream of integers from a file and writes only the positive numbers to a second file. The user shou
    5·1 answer
  • What is the purpose of a filename extension? How can you restore a file that you deleted from the hard disk?
    10·1 answer
  • An ip address in the address range 169.254.x.y, used by a computer when it cannot successfully lease an ip address from a dhcp s
    6·1 answer
  • Type of file containing instructions that tell your computer how to perform ___
    9·1 answer
  • What type of network is the internet
    10·1 answer
  • describe how sodium ammonium chloride can be separated from a solid mixture of ammonium chloride and anhydrous calcium chloride​
    15·1 answer
  • Which of the following is not a method for opening Word software?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!