This is a simple Python proram written for a class activity 10 in INF 354 At the University of Pretoria where you should Create a new Python script. It should execute the following steps:
- Count the number of Prime numbers in your student number. If p is the number of prime numbers in your student number, then apply the following logic: if p = 0 then increase p by 1.
- Let q be a random number between 25 and 50.
- Divide q by p >> Let r = q ⁒ p (Round down to the nearest integer)
- Generate r number of random strings (containing only letters of the alphabet) and store them in a list. The first string must comprise 5 characters, the second must comprise 7 characters, then it alternates from there onwards (5 chars, 7 chars, 5 chars, 7 chars, …)
- Now, sort the list by the number of vowels contained in the strings. Order the list descendingly where the strings with more vowels are moved to the front of the list and those with fewer vowels to the back. • Print out (in the console) the result from each of the above steps.