User Profile

Collapse

Profile Sidebar

Collapse
growthndevlpmnt
growthndevlpmnt
Last Activity: May 18 '12, 05:17 PM
Joined: May 7 '12
Location: Atlanta, GA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • growthndevlpmnt
    started a topic Read from file into dictionary

    Read from file into dictionary

    if this was my input file:
    Code:
    AATGC
    AGGC
    0.0
    0.0
    4
    ATGC
    4
    ATGC
    1 1 A A 1
    1 2 A T 0
    1 3 A G 0
    1 4 A C 0
    2 1 T A 0
    2 2 T T 1
    2 3 T G 0
    2 4 T C 0
    3 1 G A 0
    3 2 G T 0
    3 3 G G 1
    3 4 G C 0
    4 1 C A 0
    4 2 C T 0
    4 3 C G 0
    4 4 C C 1
    How could I generate a dictionary using the last 16 lines?...
    See more | Go to post

  • growthndevlpmnt
    replied to Trying to justify text using Python
    Thanks a lot. You have helped me drastically improve readability of my code. I'm still working out the method you suggested, but i already like the way it looks.
    See more | Go to post

    Leave a comment:


  • growthndevlpmnt
    started a topic Trying to justify text using Python

    Trying to justify text using Python

    Ok so I'm supposed to be taking a input text file and justifying it. I've have gotten the text to do character justification bar the last line. I'm trying to figure out how to iterate over each space and insert a ' ' to get the last last up to the specified length.

    If I try
    Code:
    for ' ' in new:
        insert(new,' ',find(' '))
    in the spirit of simple style that python has taught me,
    I get a non iterable error....
    See more | Go to post

  • growthndevlpmnt
    replied to How to format spaces in output?
    Thank you SO much. It's always the little things. #embarrassment
    See more | Go to post

    Leave a comment:


  • growthndevlpmnt
    started a topic How to format spaces in output?

    How to format spaces in output?

    Code:
    dim = int(input("Enter the size of the diamond: "))
    area = int(input('Enter the numer of times to be printed: '))
    
    def diamond(size, times):
    ***for j in range(times):
    *******for i in range(size):
    ***********print (" "*(size-i) + "* " * i)*times
    
    *******for i in range(size+1):
    ***********print (" "*(i) + "* "*(size-i))*times
    ...
    See more | Go to post
No activity results to display
Show More
Working...