User Tools

Site Tools


assignment2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
assignment2 [2018/09/27 09:31]
dokuroot created
assignment2 [2018/09/29 13:38] (current)
dokuroot
Line 17: Line 17:
 </​code>​ </​code>​
  
 +''​if __name__ == '​__main__':''​ basically means to execute the code  within the body of the ''​if''​ statement only if the file is executed from the command line as a script.
 +\\
  
 ====Exercise 2==== ====Exercise 2====
-Write a function called ''​stop_codon()''​ that tests for the presence of a stop codon (UGA, UAA, and UGA) in an RNA sequence and returns a Boolean value indicating whether the sequence contains a stop codon. The sequence should be passed to the function as in 1.+Write a function called ''​stop_codon()''​ that tests for the presence of a stop codon (UAG, UAA, and UGA) in an RNA sequence and returns a Boolean value indicating whether the sequence contains a stop codon. The sequence should be passed to the function as in 1.
 \\ \\
  
Line 35: Line 37:
  
 ====Exercise 5==== ====Exercise 5====
-Write a function called ''​sum_num()''​ that computes the sum of up to 4 numbers ​(i.e. the user can enter 1-4 numbers)+Write a function called ''​sum_num()''​ that computes the sum of up to 4 numbers. ​**You do not need to prompt ​the user for the numbers.**
  
 ====Exercise 6==== ====Exercise 6====
assignment2.1538062289.txt.gz ยท Last modified: 2018/09/27 09:31 by dokuroot