I am taking a CS course in college and I'm completely new to this, and I am so lost. I get the basics I just have a hard time putting it all together. Please do #1 and #2 as if you're new, the code doesn't have to be complex/perfect, just so long as it gets me started in the right direction. thanks!
Note: you may not use list comprehensions or similar Python constructs not taught yet in this course. You many not use dictionaries. See notes for individual problem for any additional constraints. 1. Write function modifyString(origString, chars To Replace, count) that takes as input a string origString, a string chars To Replace, and a positive integer count, and returns a new string such that each character in origString that occurs in chars ToReplace is replaced by n consecutive copies of that character (with the same case as in the original). For example, >>> modifyString("Our cat is funny.", "aeiou", 5) 00000uuuuur caaaaat iiiiis fuuuuunny. >>> modifyString("Our cat is funny.", "zu", 3) "Ouuur cat is fuuunny." 2. Write a function, 42(inputString, minLetter), that takes as input a string of letters and returns six things: the lexicographically smallest letter (UZ >y/Y> ... > a/A) greater or equal to minLetter, the smallest index at which that letter occurs, the third smallest letter greater than minLetter, the smallest index at which that letter occurs, the most common letter, and how many times the most common letter occurs. The third smallest letter must be distinct from the second smallest which must be distinct from the smallest. E.g. 'b' is the second smallest and 'e' is the third smallest in 'ababde Ignore case during computation. E.g. 'Z and 'Z' are considered the same letter. Use lower case when returning letters. Return None for smallest and thirdSmallest letters and corresponding indices when appropriate You may not assume that the input string contains at least three different characters (or even any characters at all). Make sure to recognize various situations where fewer than three different letters appear in the string, and where there is no third smallest or smallest greater than minLetter. If two or more letters tie for most common, return the lexicographically smallest one. For example: >>> 42('aacyYcqyoQqyqe', 'b') ('c', 2, 'y', 3, 'q', 5) >>> 22 ['aacyYcqyooqyqe', 'I) ('y', 3, None, None, 'q', 5) IMPORTANT NOTE: Use one or more simple loops, and simple comparison (, ,!) operators only. You may use to access single characters of a string. You may not use built in min, max, sort, or sorted functions (you should also not write your own sorting method). You may not use any built-in string methods other than lower()). You may not use lists or dictionaries or the ord function