1. Write and test a Python implementation of the Markov chain algorithm. 2. Add
ID: 3626587 • Letter: 1
Question
1. Write and test a Python implementation of the Markov chain algorithm.2. Add testing code to the Python implementation of the Markov chain algorithm, which verifies that each pair of consecutive words obtained during generate phase also occurred during build phase as a pair of consecutive words coming from the input document. During build phase create a vector consisting of all input words. During generate phase verify that every pair of consecutive random suffixes occurs as a pair of consecutive words inside the vector of input words.