<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Random
choices
Step1:  Lets try some graphs on them
Step2:  In the above graph, you can see that everytime, "X" were the lowest and "Mukesh" & "Manish" were the highests names in the created list and more I increase the value of k more prominent the graph becomes as shown in the below code and graph
<ASSISTANT_TASK:>
Python Code:
from random import choices
lnct_few_friends = ["Jyoti Pancholi", "Amit Shrivastava", "Mukesh Bansal", "Preeti Saraswat", "Manish Nandle"]
list_of_prob = [0.2, 0.1, 0.3, 0.2, 0.2]
lnct_few_friends = choices(lnct_few_friends, weights=list_of_prob, k=200)
for name in set(population):
    print(name, lnct_few_friends.count(name))
Explanation: Random
choices: A weighted version o random
Python >= 3.6
End of explanation
from random import choices
import matplotlib.pyplot as plt
lnct_few_friends = ["X", "Jyoti Pancholi", "Amit Shrivastava", "Mukesh Bansal", "Preeti Saraswat", "Manish Nandle"]
list_of_prob = [0.05, 0.15, 0.1, 0.3, 0.1, 0.3]
d = {}
for i in range(10):
    a = {}
    lst = choices(lnct_few_friends, weights=list_of_prob, k=10)
    for name in set(lnct_few_friends):
        a[name] = lst.count(name)
    d[i] = a
# print(d)
import matplotlib.pyplot as plt
from  matplotlib import ticker
import math
plt.xticks(rotation=90)
for key, val in d.items():
    plt.plot(val.keys() ,val.values(), marker="o")
Explanation: Lets try some graphs on them
End of explanation
from random import choices
import matplotlib.pyplot as plt
lnct_few_friends = ["X", "Jyoti Pancholi", "Amit Shrivastava", "Mukesh Bansal", "Preeti Saraswat", "Manish Nandle"]
list_of_prob = [0.05, 0.15, 0.1, 0.3, 0.1, 0.3]
d = {}
for i in range(10):
    a = {}
    lst = choices(lnct_few_friends, weights=list_of_prob, k=900)
    for name in set(lnct_few_friends):
        a[name] = lst.count(name)
    d[i] = a
import matplotlib.pyplot as plt
from  matplotlib import ticker
import math
plt.xticks(rotation=90)
for key, val in d.items():
    plt.plot(val.keys() ,val.values(), marker="o")
Explanation: In the above graph, you can see that everytime, "X" were the lowest and "Mukesh" & "Manish" were the highests names in the created list and more I increase the value of k more prominent the graph becomes as shown in the below code and graph
End of explanation
<END_TASK>