You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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.
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?
The text was updated successfully, but these errors were encountered: