Modify the `countBases.py` script to create a dictionary of nucleotide counts (G, A, C, T), count the occurrences of each nucleotide, and print out the counts.

Question image

Understand the Problem

The image contains a programming challenge related to modifying a Python script called countBases.py. The challenge involves creating a dictionary to store nucleotide counts (G, A, C, T), counting the occurrences of each nucleotide, and then printing out the counts.

Answer

Modify the `countBases.py` script to count nucleotides (G, A, C, T) using a dictionary and print the counts.

The task is to modify the countBases.py script to count the occurrences of each nucleotide (G, A, C, T) in a DNA sequence and print out the counts using a dictionary. The code should create an empty dictionary, count the nucleotides, and use a loop to print the counts for each nucleotide.

Answer for screen readers

The task is to modify the countBases.py script to count the occurrences of each nucleotide (G, A, C, T) in a DNA sequence and print out the counts using a dictionary. The code should create an empty dictionary, count the nucleotides, and use a loop to print the counts for each nucleotide.

More Information

This task involves basic Python scripting, including dictionary creation and manipulation, loop usage, and string formatting. It's a fundamental exercise in bioinformatics.

Tips

Remember to initialize the dictionary correctly and handle indentations carefully in Python. Ensure that the loop iterates through all the nucleotides.

AI-generated content may contain errors. Please verify critical information

Thank you for voting!
Use Quizgecko on...
Browser
Browser