now that you know how to code basic program logicthe following exercises will ask you to implement some simple tasks with statements most of the work is in exercise which lets you explore coding alternatives there are always many ways to arrange statementsand part of learning python is learning which arrangements work better than others you'll eventually gravitate naturally toward what experienced python programmers call "best practice,but best practice takes practice see part iii in appendix for the solutions coding basic loops this exercise asks you to experiment with for loops write for loop that prints the ascii code of each character in string named use the built-in function ord(characterto convert each character to an ascii integer this function technically returns unicode code point in python xbut if you restrict its content to ascii charactersyou'll get back ascii codes (test it interactively to see how it works nextchange your loop to compute the sum of the ascii codes of all the characters in string finallymodify your code again to return new list that contains the ascii codes of each character in the string does the expression map(ordshave similar effecthow about [ord(cfor in ]why(hintsee backslash characters what happens on your machine when you type the following code interactivelyfor in range( )print('hello % \ \aibeware that if it' run outside of the idle interface this example may beep at youso you may not want to run it in crowded roomidle prints odd characters instead of beeping--spoiling much of the joke (see the backslash escape characters in table - sorting dictionaries in we saw that dictionaries are unordered collections write for loop that prints dictionary' items in sorted (ascendingorder (hintuse the dictionary keys and list sort methodsor the newer sorted built-in function program logic alternatives consider the following codewhich uses while loop and found flag to search list of powers of for the value of raised to the fifth power ( it' stored in module file called power py [ found false while not found and len( )test your knowledgepart iii exercises