Zoom
3. Perform basic string compression using the counts of repeated characters. (1 point)
The output should be:
1. Test fl (1 mark)
2. Test f2 (1 mark)
3. Test f3 (1 mark)
Your selection (1 -> 3):
3
Enter a string: pppppppppffffffffpppppppp
OUTPUT
p9f8p8
Question 2 (3 points)
Write a program in Python that reads a text file "data.txt" (attached in the given).
1. Read in the file and print them on the screen. (0.5points)
The output should be:
+ 100%
Close