Python Forum
Question #1: Count symbols
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question #1: Count symbols
#1
In this question, you are given a string s which represents a DNA string. The string s consists of symbols 'A', 'C', 'G', and 'T'. An example of a length 21 DNA string is "ATGCTTCAGAAAGGTCTTACG."
Your task is to write a code which will count the number of times each of the symbols 'A', 'C', 'G', and 'T' occur in s. Your code should generate a list of 4 integers and print it out.
In [1]:
# Here is the DNA string:
​s = 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC'
# Type your code here
Reply


Messages In This Thread
Question #1: Count symbols - by aapurdel - May-26-2019, 03:33 AM
RE: Question #1: Count symbols - by heiner55 - May-26-2019, 04:12 AM
RE: Question #1: Count symbols - by perfringo - May-26-2019, 08:23 AM
RE: Question #1: Count symbols - by heiner55 - May-29-2019, 02:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to use list of symbols for sympy calculation in python? tanmaybhise 1 2,828 Mar-01-2020, 10:36 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020