Introduction to Programming: print(arg1): prints arg1 prin…

Introduction to Programming: print(arg1): prints arg1 print(“hi”), prints hi print(var), prints the value stored in var More Variables and Interacting with the User: int(arg1): converts arg1 (float or string) to an integer int(“7”) returns 7 int(7.9) returns 7 float(arg1): converts arg1 (integer or string) to a float float(“7”) returns 7.0 float(7) returns 7.0 str(arg1): converts arg1 to a string str(7) returns “7” len(arg1): returns the length of arg1 (string, list, or dictionary) len(“ASDF”) returns 4 string.count(arg1): returns the number of times arg1 appears in string Assume str1 = “aA”; str1.count(“A”) returns 1 string.upper(): returns the uppercase version of string Assume str1 = “aA”; str1.upper() returns “AA” string.lower(): returns the lowercase version of string Assume str1 = “aA”; str1.lower() returns “aa” string.replace(arg1, arg2): returns string with all instances of arg1 replaced with arg2 Assume str1 = “aAtAgg”; str1.replace(“A”, “2”) returns “a2t2gg” Conditional Statements: Conditional statement reserved words: if, elif, and else Logical operators: and, or, and not Number/string comparison operators: ==, !=, >, =, and