subject

A rumor spreads in the following way: a person picks at random another person to inform of the rumor. If that person hasn't already been informed of the rumor, that person starts spreading the rumor as well. If that person had already been informed of the rumor, neither person spreads this rumor any further. Starting with 999 people who don't know the rumor and one who does and starts spreading it, write a program that simulates this situation and then prints the final percentage of the population that ends up knowing the rumor

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
What is the most popular genre of video games?
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
Answers: 1
You know the right answer?
A rumor spreads in the following way: a person picks at random another person to inform of the rumor...
Questions
question
Mathematics, 19.09.2019 01:50
question
Mathematics, 19.09.2019 01:50
question
Mathematics, 19.09.2019 01:50
Questions on the website: 13722363