Homework1
Opened this issue · 1 comments
amra12 commented
Hi Professor,
For the excersise 3.2 , for the example which is abcabcda after I found the probabilities and put them in dictionary dic_prob= {bcd : 0.5 , bca:0.5} ,
the text can be for example bcdad right?
And last thing when I use loop to add either 'a'with probability 0.5 or 'c' with probability 0.5 , how can I attach this adding character based on the probability , I mean is there something out of the box , or should I invent a new algorithm my self?
juditacs commented
There is really nothing more to invent, you basically described the solution. Strings can be concatenated using the +
operator. You don't need any black-box algorithms.