class Stringex: staticmethod def main(): wd = "basketball" # total of 10 characters in the String value print(wd[0]) # index of 1st character in the String value print(wd[1]) # index of 2nd character in the String value print(wd[2]) # index of 3rd character in the String value print(wd[9]) # index of last character in the String value person1 = "Michael" person2 = "John" print(person1 == person2) print(person1 != person2) txt1 = "Python is " txt2 = "awesome!" txt3 = txt1 + txt2 print(txt3) a = "5" b = "10" c = a + b print(c) x = 5 y = 10 z = x + y print(z) print("The value of z is " + str(z)) txt = "Welcome to RMIT University" c1 = txt.count("e") c2 = txt.count("r") c3 = txt.count("o") print("The number of 'e' in txt is ") print(c1) print("The number of 'r' in txt is ") print(c2) print("The number of 'o' in txt is ") print(c3) txt2 = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum." c1 = txt2.count("e") c2 = txt2.count("r") c3 = txt2.count("o") print("The number of 'e' in txt is ") print(c1) print("The number of 'r' in txt is ") print(c2) print("The number of 'o' in txt is ") print(c3) txt = "Welcome to RMIT University" e = txt.find("to") print("You can find value 'to' in txt at index ") print(e) txt = "Welcome to RMIT University" f = "RMIT" in txt print("Is there value 'RMIT' in txt") print(f) txt = "Welcome to RMIT University" g = "rmit" in txt print("Is there value 'rmit' in txt") print(g) txt = "Welcome to RMIT University" print("The number of characters in txt") print(len(txt)) Stringex.main()