






























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!































Sr. no. Title Date Remarks 1 Introduction to Python and Datatypes 04-02- 2 Python Fundamentals 11-02- 3 Python Fundamentals 18-2- 4 Python Fundamentals 25-02- 5 Python Fundamentals 25-2- 6 Python Fundamentals 4-03- 7 Python Fundamentals 11-03- 8 Data Structures 18-03- 9 Data Structures 1-04- 10 Data Structures 8-04- 11 Data Structures 15-04- 12 Data Structures 22-04- 13 File Handling 29-04- 14 Advanced Python Development of Graphical User Interface by Tkinter 6-05- 12 Advanced Python Database connectivity 6-05-
1. Write a python program to add two dna seq length by taking user input seq1=input('Enter first sequence:') seq2=input('Enter second sequence:') final_seq=seq1+seq2 print(final_seq) 2. Python program to add molecular weight of proteins mw1=int(input('Enter the molecular weight of first prorein:')) mw2=int(input('Enter the molecular weight of second prorein:')) mw3=int(input('Enter the molecular weight of third prorein:')) mw4=int(input('Enter the molecular weight of fourth prorein:')) mw=mw1+mw2+mw3+mw print(mw) 3. Python program to convert the poły a taił of dna into upper case poly_a_tail=input('Enter the sequence:') conv_poly_a_tail=poly_a_tail.upper() print(conv_poly_a_tail)
7. Python program to find whether the given protein sequence ends with glycine. protein_seq=input('Enter the sequence:') endswith_glycine=protein_seq.endswith('g') print(endswith_glycine) 8. Python program to find whether the given protein sequence starłs with with tryptophan and cysytine. protein_seq=input('Enter the protein sequence:') startswith_wc=protein_seq.startswith('WC') print(startswith_wc) 9. Python program to find whether the given DNA sequence has thymine and alanine. dna_seq=input('Enter the DNA sequence:') dna_seq_ta=dna_seq.find('t and a') print(dna_seq_ta)
10. Python program to concatenate a protein sequence and iłs molecular weight by format method() protein_sequence=input('Enter the protein sequence:') molecular_weight=input('Enter the molecular weight of the protein:') format_string=f'The protein sequence is {protein_sequence}, the molecular weight of the protein is {molecular_weight}' print(format_string) 11. Python program to find whether the give protein sequence has the presence of active site(GAGAGA) protein_seq=input('Enter the protein sequence:') active_site=protein_seq.find('gagaga')!=-1 print(active_site) 12. Python program to find whether the give protein ACCESSION ID AHS NUMBERS AND CHARACTERS accession_id=input('Enter the accession ID:') ac_id_isalnum=accession_id.isalnum() print(ac_id_isalnum)
16. Write a python program to demonstrate arithmetic operators. x=float(input('Enter a number:')) y=float(input('Enter another number:')) a=x+y print(a) b=x-y print(b) c=xy print(c) d=x/y print(d) e=x%y print(e) f=xy print(f) g=x//y print(g) 17. W.A.P to calculate the GC content of a DNA sequence. dna_sequence=input('Enter a dna sequence:') total_nucleotides=len(dna_sequence) g_content=dna_sequence.count('g') c_content=dna_sequence.count('c') gc_content=((g_content+c_content)/total_nucleotides) print(gc_content)
18. W.A.P to calculate the number of nucleotides of a Zika DNA segment. zika_dna_segment=input('Enter the Zika DNA segment:') number_of_nucleotides=len(zika_dna_segment) print(number_of_nucleotides) 19. W.A.P to demonstrate the use of comparison operators. (Take Two DNA strings as input and do the comparison) string_1=input('Enter the first string:') string_2=input('Enter the second string:') print(string_1==string_2) print(string_1!=string_2) print(string_1>string_2) print(string_1=string_2) print(string_1<=string_2)
22. W.A.P to take a DNA sequence in lower case,convert ił to upper case and print the second and last nucleotide , and first and last codon of the sequence. dna_sequence=input('Enter a dna sequence:') upper_dna_sequence=dna_sequence.upper() print('Second nucleotide:',upper_dna_sequence[1]) print('Last nucleotide:',upper_dna_sequence[-1]) print('First codon:',upper_dna_sequence[0:3]) print('Last codon:',upper_dna_sequence[-3:]) 23. W.A.P to initialize a green fluorescence protein , first four codons and RNA sequence for GFP and concatenate several codons coding for GFP protein. String codon_1='ATG' codon_2='ACG' codon_3='AAA' codon_4='AGC' codons_for_GFP=codon_1+codon_2+codon_3+codon_ print(codons_for_GFP)
24. Initialize a Human D-Loop and print ił. Initialize the sub-string to be searched. (Example :CAT), Extract the first and second codon after the sub-string,next to last and last). human_d_loop='ATGCATCGATCGTACCGACGGT' print(human_d_loop) sub_string=human_d_loop.find('CAT') print(sub_string) print(human_d_loop[6:9]) print(human_d_loop[9:12]) print(human_d_loop[-3:]) print(human_d_loop[-6:-3]) 25. W.A.P to demonstrate the use of logical operators x = 5 print(x > 3 and x < 10) x = 5 print(x > 3 or x < 4) x = 5 print(not(x > 3 and x < 10))
print('Yes') else: print('No')
29. W.A.P to find whether the given protein has a signal peptide region ((slice a signal peptide region protein_sequence=input('Enter the protein sequence:') sliced_protein_sequence=(protein_sequence[0:7]) if sliced_protein_sequence=='MWSTA': print('Yes') else: print('No') 30. W.A.P to find if the last codon in a DNA segment is the start codon ATG or one of the stop codons TAA, TAG, or TGA or none of the above. dna_sequence=input('Enter the DNA sequence:') codon=dna_sequence[-3:] if codon=='ATG': print('The last codon of the sequence is a start codon') elif codon in ['TAA','TAG','TGA']: print('The last codon of the sequence is a stop codon') else: print('None of the above')
31. W.A.P to prints out all codons starting with T. dna = input("Enter DNA sequence: ") print("Codons starting with T are:") for i in range(0, len(dna), 3): codon = dna[i:i+3] if len(codon) == 3 and codon.startswith('T'): print(codon) 32. W .A.P to create a sequence of numbers from 3 to 19 with incremenation of 2. seq_of_nos=[3,5,7,9,11,13,15,17,19] print(seq_of_nos) 33. W.A.P to create a list of codons coding for collagen protein. codons_for_collagen=input('Enter the codons for collagen:') print(codons_for_collagen)
37. W.A.P to add a codon to the list and remove a codon which is creating a genetic variation list dna_sequence=input('Enter the DNA sequence:').split() dna_sequence.insert(2,'ATT') print(dna_sequence) dna_sequence.remove('AGC') print(dna_sequence) 38. W.A.P to count the frequency of amino acid in the given protein sequence. protein_sequence=input('Enter the protein sequence:') frequency_of_amino_acid=protein_sequence.count('W') print(frequency_of_amino_acid) 39. Write a Python program to sum all the items in a list. a = [10, 20, 30, 40, 50] res = sum(a) print(res)
40. Write a Python program to get the protein highest molecular weight from a list. molecular_weight=input('Enter the molecular weights:').split() print(molecular_weight) highest_molecular_weight=max(molecular_weight) print(highest_molecular_weight) 41. Write a Python program to get the smallest number from a list. list_items=input('Enter the list items:').split() print(list_items) smallest_item=min(list_items) print(smallest_item) 42. Write a Python program to check if a list is empty or not list list_items=[] if not list_items: print('The list is empty') else: print('The list is not empty')