Question: Assignment 2.[10 Points] Consider a Python list L, which contains an arbitrary but finite number of characters 'H' and T. The characters 'H' and 'T'
Assignment 2.[10 Points] Consider a Python list L, which contains an arbitrary but finite number of characters 'H' and T. The characters 'H' and 'T' stand for heads and tails outcomes of a repeated coin toss process. Write a Python function which takes such a list L as its argument on input and computes the heads-to-tails counts. For example, if L = ['T', 'H', 'T', 'H', 'H', 'H', 'H','T', 'H'), the function would print to screen exactly "the ( HT) count is (6,3)", listing the heads count first and then the tails counts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
