Python Simple ex.
1. Write a program called “print-two-args.py” that reads the first two command line arguments after the program name, stores their values as variables, and then prints them on the same line with a colon between.
> python print-two-args.py hello world
hello : world
2. Write a program called “add-two-args.py” that reads the first two command line arguments after the program name, stores their values as variables, and then prints their sum.
> python add-two-args.py 1 2
3. Write a program called dna2rna.py that reads a DNA sequence from the first command line argument, and then prints it as an RNA sequence. Make sure it works for both uppercase and lowercase input. (T/t à U/u)
> python dna2rna.py AGTCAGT
> python dna2rna.py actcagt
> python dna2rna.py ACTCagt
4. Write a program get-codons.py that reads the first command line argument as a DNA sequence and prints the first three codons, one per line, in uppercase letters.
> python get-codons.py TTGCAGTCG
> python get-codons.py TTGCAGTCGATC
> python get-codons.py tcgatcgac
5. Write a program that reads a protein sequence as a command line argument and prints the location of the first cysteine residue ('C')
> python find-cysteine.py MNDLSGKTVIITGGARGLGAEAARQAVAAGARVVLADVLDEEGAATARELGDAARYQHLDVTIEEDWQRVCAYAREEFGSVDGL
> python find-cysteine.py MNDLSGKTVIITGGARGLGAEAARQAVAAGARVVLADVLDEEGAATARELGDAARYQHLDVTIEEDWQRVVAYAREEFGSVDGL