genus = 'Dipodomys' species = "spectabilis" print(genus) print(species) ds_description = """Dipodomys spectabilis is the scientific name for the Banner-tailed Kangaroo Rat.""" print ds_description latin_binomial = "Dipodomys ordii" len(latin_binomial) genus + species + 'weighs about 125 grams.' genus + ' ' + species + ' weighs about 125 grams.' output = "%s %s weighs about %d grams." % (genus, species, 125) print output print('The individual's mass is 122 grams.') print('The individual\'s mass is 122 grams.') ds_description print("The individuals's mass is 122 grams.") print('The original paper states that "The mass of Dipodomys spectabilis is approximately 125 grams."') import string genus = 'Dipodomys' species = ' spectabilis' latin_binomial = 'Dipodomys ordii' dna_seq = 'atgcagatcctgtgtgtctagctaag' print("The lower case version of genus is: %s" % string.lower(genus)) print("The upper case version of species is: %s" % string.upper(species)) print("The value of species without the leading whitespace is: %s" % string.strip(species)) print("The location of the start of the first 'tcct' in dna_seq is: %s" % string.find(dna_seq, 'tcct')) print("The number of a's in dna_seq is: %s" % string.count(dna_seq, 'a')) genus, species = string.split(latin_binomial) print("The genus in latin_binomial is: %s" % genus) print("The species in latin_binomial is: %s" % species) genus = "Dipodomys" upper_cased_genus = genus.upper() print upper_cased_genus genus = 'Dipodomys' species = ' spectabilis' latin_binomial = 'Dipodomys ordii' dna_seq = 'atgcagatcctgtgtgtctagctaag' print("The lower case version of genus is: %s" % genus.lower()) print("The upper case version of species is: %s" % species.upper()) print("The value of species without the leading whitespace is: %s" % species.strip()) print("The location of the start of the first 'tcct' in dna_seq is: %s" % dna_seq.find('tcct')) print("The number of a's in dna_seq is: %s" % dna_seq.count('a')) genus, species = latin_binomial.split() print("The genus in latin_binomial is: %s" % genus) print("The species in latin_binomial is: %s" % species)