<prompt> Andika programu ya kompyuta ya kutabiri uwezekano wa tukio la kutupa sarafu.  <response>: Heres a simple Python program that simulates the tossing of a coin and predicts the probability of the coin landing on heads or tails:pythonimport random Function to simulate the tossing of a coindef coin_tossn: Initializing the number of heads and tails heads 0 tails 0 Simulate the coin toss for i in rangen: toss random.randint0, 1 If toss is 0, it is Heads if toss 0: heads 1 If toss is 1, it is Tails else: tails 1 Calculate the probability of heads and tails probability_heads heads n probability_tails tails n printProbability of Heads:, probability_heads printProbability of Tails:, probability_tails Test the function with 1000 coin tossescoin_toss1000Explanation:This program simulates the tossing of a coin n times using the random.randint function to generate random numbers between 0 and 1. If the random number is 0, we consider it as Heads and if its 1, we consider as Tails. The program counts the number of heads and tails and calculates the probability of each by dividing the count by the total number of tosses.Note: Over a large number of trials, the probability of the coin landing on either heads or tails is expected to be approximately 0.50 50. However, since these are random events, the probabilities may not be exactly the same over a smaller number of trials. 