- Write a program that finds the minimal enzyme activity in each of the tissues
mentioned in Assignment 2.2:
brain: 65, 69, 70, 63, 70, 68.
heart: 102, 95, 98, 110.
lung: 112, 115, 113, 109, 95, 98, 100.
Use a subroutine that returns the lowest number of any given list of numbers.
- Write a program that asks the user to enter two odd numbers,
creates an array that contains all odd numbers between them
(including the entered numbers), and prints this array in descending order.
If the entered numbers are not odd the program should only print an error message.
If the first entered number is larger than the second one, the program should still be able
to print all the odd numbers between them (and the numbers themselves)
in descending order.
Use push, if, while or until.
- Rewrite the program above
so that it will use a for loop instead of while/until
- Write a subroutine that calculates the
number of occurrences of "G" (lower and upper case) in a sequence of nucleotides
(e.g. "GTGCCAAGCGCACACCCCGCC") passed to it,
and a main program that calls this subroutine.
Use: while, chop, if.
Hint: your routine can chop one character after the other from
$seq, and check whether it equals to "G" (or "g"), until $seq is empty.
- Write a program that repeats asking the user to enter a number
until the cumulative sum of the entered numbers exceeds 100
(or some other constant number set by the program).
Use a do { } while / until loop.
- Write an iterative subroutine that computes N factorial.
The program should ask the user for an integer number N, and output N!
The program should return an error message if the entered number is
not a positive whole number.