Write program to read 10 random numbers, then find how many of them accept division by 4,
5, and 6.
The program should print the output like this:
There are numbers accept division by 4
There are ------ numbers accept division by 5
There are ------ numbers accept division by 6
Help me guys with this question

Answers

Answer 1

Answer:

In Python:

import random

di4 = 0; di5 = 0; di6 = 0

for i in range(10):

   num = random.randint(1,100)

   if num%4 == 0:

       di4+=1

   if num%5 == 0:

       di5+=1

   if num%6 == 0:

       di6+=1

print("There are "+str(di4)+" numbers accept division by 4")

print("There are "+str(di5)+" numbers accept division by 5")

print("There are "+str(di6)+" numbers accept division by 6")

Explanation:

This imports the random module

import random

This initializes the count of division by 4, 5 or 6 to 0

di4 = 0; di5 = 0; di6 = 0

This iteration is repeated 10 times

for i in range(10):

This generates a random number

   num = random.randint(1,100)

Check if number is divisible by 4. If yes, increase div4 by 1

   if num%4 == 0:

       di4+=1

Check if number is divisible by 5. If yes, increase div5 by 1

   if num%5 == 0:

       di5+=1

Check if number is divisible by 6. If yes, increase div6 by 1

   if num%6 == 0:

       di6+=1

Print reports

print("There are "+str(di4)+" numbers accept division by 4")

print("There are "+str(di5)+" numbers accept division by 5")

print("There are "+str(di6)+" numbers accept division by 6")


Related Questions

Nicolai wants to add demand-based content to his Website so that customers can access the information at their behest. Which audience-development technique describes the process Nicolai wants to implement?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A

Visitor tracking
B

Push technology
C

Pull technology
D

Search Engine Optimization (SEO)

Answers

Answer:

The audience development technique that best describe the process Nicolal wants to implement is;

C Pull technology

Explanation:

Pull technology is a form of network mode of communication in which the initial data request comes from the client side of the network for it to be handled by the server side of the network.

Given that Nicola wants a demand-based content to his website for customers to access information when they wish to, the process is similar t the podcasting in which each new content is posted to a specific RSS feed from where it can be requested by a mobile app, directory or a RSS feed reader

The counter technology is a push technology where the servers push content to intended clients, such as for an incoming call, instant messaging, synchronous conferencing (online c h a t) and files.

Which of the following does Secure Sockets Layer (SSL) use to authenticate a user or system before encrypting a session?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9.
A

A digital certificate
B

A certificate authority
C

An Electronic Funds Transfer (EFT)
D

A payment gateway

Answers

Answer:

B is more probable option than C

Explanation:

I think its both B and C

A certificate authority does Secure Sockets Layer (SSL) used to authenticate a user or system before encrypting a session. Hence, option B is correct.

What is Secure Sockets Layer (SSL)?

Secure Sockets Layer (SSL) is a security protocol used to establish an encrypted link between a web server and a web browser. It was replaced by Transport Layer Security (TLS) as the standard protocol, but the term "SSL" is still commonly used to refer to both SSL and TLS.

When a user enters a website using SSL/TLS, the website's server sends a public key to the user's browser. The browser then uses this public key to encrypt data that is sent back to the server.

This helps to prevent third parties from intercepting and reading the data being transmitted.

Thus, option B is correct.

To learn more about the Secure Sockets Layer (SSL), follow the link:

https://brainly.com/question/25401676

#SPJ2

who is the group who created Top- level domain ?​

Answers

Answer:

Technically, The Government

Explanation:

they founded the USA right?, yes and no. they weren't the only ones to make countries. You also have Korea, Asia, The UK, and much more, Concluding that they are not the only ones to have made a Top Level Domain.

Pls vote me Brainliest

~Kai

Use the drop-down menus to match each description to the correct type of form.
A form appears after opening a database, asking if you would like to view the fruits table, vegetables
table, or nutrition report:
Student test scores entered into a database:
A window appears before closing out of a database, asking you to save your work before exiting:
A basic form to input names, addresses, phone numbers, and e-mail addresses:
A suppliers form that contains a products form and a price form that pops up when you click on the Prices
button:
A form used as the basis of many websites because of its top-level organization system:
A form that has replaced the outdated switchboards:

Answers

Answer: switchboard, data entry, switchboard, flat, synchronized, navigation, navigation

Explanation: edgenuit work

Answer:A form appears after opening a database, asking if you would like to view the fruits table, vegetables table, or nutrition report:

✔ switchboard

Student test scores entered into a database:

✔ data-entry

A window appears before closing out of a database, asking you to save your work before exiting:

✔ switchboard

A basic form to input names, addresses, phone numbers, and e-mail addresses:

✔ flat

A suppliers form that contains a products form and a price form that pops up when you click on the Prices button:

✔ synchronized

A form used as the basis of many websites because of its top-level organization system:

✔ navigation

A form that has replaced the outdated switchboards:

✔ navigation

edge 2023

This line of code is in your program.
outFile = open("another.txt", "a")
How will outFile interact with the file it opens?

Answers

Answer:

it opens the file for appending

Answer:

write to the file, adding to the current contents of the file

Explanation:

The "a" stand for append. To append means to add onto the file.

I hope this helped!

Good luck <3

Your program analyzes complex data.
You are going to read text from a file as part of your program.
The program is saved in a folder, which has a subfolder called "numbers."
In the info folder is a text file called "sales.txt."
Which line of code will open sales.txt?
O results = open("sales.txt","r")
O results.open("sales.txt", "w")
O results = open("numbers/sales.txt","r").
O results = open("numbers/sales.txt", "w")

Answers

results = open("numbers/sales.txt","r")

Read the following examples, and decide whether each example describes a relational database or a flat
file. Use the drop-down menus to make your selection.
An author keeps track of income and expenses in a table:
A college admissions department stores detailed information about each applicant, including his or her
full name, address, high school, GPA, standardized test scores, intended major, and entrance exam
scores:
A social media website has many users who are allowed to upload photos, videos, and information about
themselves:
A library stores information about patron names, account numbers, books out on loan, the date books are
due, the date books are returned, the number of days a book is overdue, and overdue book fines; this
information allows the system to e-mail or call patrons to remind them to return books on time:

Answers

Answer: flat file, relational database, relational database, relational database

Explanation:

Edge

Answer:

1. flat file

2. relational detabase

3. relational detabase

4. relational detabase

Explanation:

on edg

importance of information technology in marketing​

Answers

Answer:

it helps u to convey it to more ppl by using by means of mass of communication which helps it

Customer service has improved.

_____ can be lost or stolen by cybercriminals. Select 2 options.

Free WiFi

Computer devices

Computer networks

Antivirus software

Portable devices

Answers

Answer:

Free WiFi

Computer networks

Explanation:

They cant really take your stuff they can only take virtual objects.

Free Wifi and Computer Networks

Determine the value for the following recursive method when x = 19.

Answers

Answer:

[tex]f(19) = 2[/tex]

Explanation:

Given

[tex]f(x) = f(x - 5)+ 2[/tex] --- [tex]x > 9[/tex]

[tex]f(x) = -2[/tex] --- [tex]x \le 9[/tex]

Required

Find f(19)

f(19) implies that: x = 19

Since 19 > 9, we make use of:

[tex]f(x) = f(x - 5)+ 2[/tex]

[tex]f(19) = f(19 - 5) + 2[/tex]

[tex]f(19) = f(14) + 2[/tex] ----- (1)

Calculate f(14)

f(14) implies that: x = 14

Since 14 > 9, we make use of:

[tex]f(x) = f(x - 5)+ 2[/tex]

[tex]f(14) = f(14 - 5) + 2[/tex]

[tex]f(14) = f(9) + 2[/tex] ------ (2)

Calculate f(9)

f(9) implies that: x = 14

Since [tex]9 \le 9[/tex], we make use of:

[tex]f(x) = -2[/tex]

[tex]f(9) = -2[/tex]

So:

[tex]f(14) = f(9) + 2[/tex]

[tex]f(14) = -2 + 2[/tex]

[tex]f(14) = 0[/tex]

[tex]f(19) = f(14) + 2[/tex]

[tex]f(19) = 0 + 2[/tex]

[tex]f(19) = 2[/tex]

Which type of data is shown below?
apple, 0.85
banana, 0.90
peach, 1.50

Answers

Answer:

dictionary data

Explanation:

data = {"apple" : 0.85, "banana" : 0.90, "peach": 1.50}

If you were at the front of a long line of people, stepped onto a chair and took a
picture of the line going back in the distance, what is the best F-Stop to use if you
want only the people in the middle to be in focus?

Answers

They are closer to the people and they work than a senior management

Question 3 5 points)
Which one is NOT a factor that impact the total cost of a tool or piece of equipment.

Answers

where are the choices?

nog
*
24. QUESTION 21:
Peacekeeper text is non-printing text that indicates where you can type.
(2.5 Points)
True
False

Answers

Answer: False

Explanation:

The statement that "Peacekeeper text is non-printing text that indicates where you can type" is false.

The non-printing text which shows where on exam type is referred to as the peaceholder text. It is usually an hint which can be used to fill in the actual text.

One advantage of the Second generation of programming language is that it is machine dependent. True or False

Answers

Answer:

I THINK FALSE

Explanation:

.
Which testing requires coding the test cases into a scripting language?
( blank) testing requires coding the test cases into a scripting language.

Answers

The blank is smart testing requires coding the test cases into a scripting language

The Automation is smart testing requires coding the test cases into a scripting language.

What is test scripting language?

A TEST SCRIPT is known to be a form of compositions of instructions that is known to be carry out on a system under test to see if the system can performs as it was expected.

Hence, the use of  for Automation testing is smart testing requires coding the test cases into a scripting language.

Learn more about scripting language from

https://brainly.com/question/26103815

Other Questions
I will mark either the best or the first as brainliest. How many 1/4-poundhamburger patties can be madefrom 10 pounds of hamburger? Which word describes the little mermaid's feelings toward the prince?"1 pointA InterestO B InfatuationC FondnessD Devotion Read the excerpt from the Newsela article "Opinion: From Embarrassed About Bicultural Identity, to Celebrating It."As soon as I left home, or was around my non-Indian friends, those differences were hidden away. I'd throw out the chutney sandwich my mother made for lunch. When friends stopped by the house, I'd disguise the smell of curry with air freshener and instruct my parents to speak English only. I'd never talk about my summer trips to India or the henna stains on my palms left over from an Indian wedding. I'd never mention Diwali, India's annual religious celebration known as the"festival of lights."How do the ideas in the excerpt differ from the opinion of the author of the Newsela article "Opinion: Its Important for Kids to See Diverse TV, Movie Characters"?The author of "Opinion: Its Important for Kids to See Diverse TV, Movie Characters" wants children to be focused more on family traditions than culture.The author of "Opinion: Its Important for Kids to See Diverse TV, Movie Characters" wants children to not worry about their cultural heritage.The author of "Opinion: Its Important for Kids to See Diverse TV, Movie Characters" wants children to be proud of their cultural heritage from an early age.The author of ""Opinion: Its Important for Kids to See Diverse TV, Movie Characters" wants children to be less focused on the media and more focused on academics. Picture attached pls help (will give brainliest) A 25-pound bag of bird food costs $19.50. A 30-pound bag of the same bird food costs $22.80. Which bag of bird food is the better buy? The Glazed Donut Shop made 120 donuts, and 48 of them are filled with jelly. What percent of the donuts are filled with jelly? Pls how can I round the following figures to the nearest ten, hundred, thousand (1)46,586 (2)213,340 (3)391,565 4 1/4 1 1/2 Solve the problem. (Hint: simplify before you multiply) * briefly explain the importance of researching a course before you complete your secondary education Whyis 30% of 40and 40% of 30 thesame? PLZZZ FASTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT Ooooooooofies masaaaaac sloppoooooop I stole my moms phone What does the word "docile" most likely mean, as it is used in in this sentence? One of our dogs is docile and easygoing, but the other dog never does what he is told. A. Kindhearted B. Disobedient C. Easily controlled D. young 1. What is a possible drawback to direct democracy? How might it be resolved?2. What was the divine right of kings?3. What was the Holocaust? What type of government was in effect in Germany at the time of the Holocaust?FREE ANSWER ;;;;;;;;1. A direct democracy involves democracy in its purest form. All individuals participate at an equal level. This means that all people vote on every single aspect. A drawback of this is when a society becomes too large and it is difficult to keep track of all of the votes or to find a common ground among the people. This can be resolved by having home ballots so that people can mail in their votes. 2. The divine right of kings is the idea that the king was in that position as a direct result of God's will and God's doing. 3. The Holocaust was a mass genocide of Jewish people, LGBTQ, and others. It originated in Germany and was perpetuated by the Nazi party. Write 9 3/5as an improper fraction. tan23.tan35.tan60.tan67.tan55 = (a) 1 (b) 1/3 (c) 3 (d) 0maths STD 10 Which of the following statements about sperm are true? Check all that apply.Sperm grow in both male and female reproductive organs.Sperm have one set of twenty-three chromosomes.Sperm have a tail for mobility.Sperm have heads that are five millimeters long.B and C 25.Review Love is Not All. Explain how the figurative language of lines three and four buildsupon the first two lines. How does this progression further develop the theme of the poem? If a ball has 300 Joules of potential energy at its highest point, how much kinetic energy will it have at its highest speed? A; less than 300 JoulesB; more than 300 JoulesC: exactly 300 JoulesD; cannot be determined