# Author: James Tam # Version: November, 2012 # Learning concepts: # Common string functions (chr,ord,len) # Returns the ASCII value (ordinal value) of a character ch = input("Enter a single character: ") print(ord(ch)) # Allows a lookup: for a particular ASCII number it displays the appropriate character # chr(ASCII_number) - returns the appropriate ASCII character num = int(input("Enter ASCII number of character to lookup: ")) print(chr(num)) # len(aString) a function that returns an integer that is the length of the string print("Enter your first name and I will tell you how long it is!") firstName = input("First name: ") print(len(firstName))