Choice Operators (Making Choices)
Create the following variables:
w = 10.2
x = 1.3
y = 2.8
z = 17.5
dna1 = 'attattaggaccaca'
dna2 = 'attattaggaacaca'
species1 = 'diplodocus'
species2 = 'tyrannosaurus'
Use them to print whether or not the following statements are
True or False:
- wis greater than 10
- w+- xis less than 15
- xis greater than- y
- 2 * x+ 0.2 is equal toy
- dna1is the same as- dna2
- dna1is not the same as- dna2
- The number of occurrences of the base t is the same in dna1anddna2
- xtimes- wis between 13.2 and 13.5
- species2comes before- species1alphabetically
- wis greater than- x, and- yis greater than- z
- dna1is longer than 5 bases, or- zis less than- w*- x, or both
- The combined length of dna1anddna2is greater than or equal to 30
- (w+x+y) divided by the logarithm (base 10) of 100 is equal to 7.15
- The GC content (which is always a percentage) of dna1is not the same as the GC content ofdna2