User Profile

Collapse

Profile Sidebar

Collapse
Jane Janey
Jane Janey
Last Activity: May 23 '13, 08:59 AM
Joined: Apr 18 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Jane Janey
    started a topic Combine output in python after break

    Combine output in python after break

    I want to combine two of my print statement so that it has no gap in between. How do I remove gap after break? This is my code:

    Code:
    alpha1 = 'a'
        n = 6 
        while alpha1:
           n -= 1
           print "%-*s" % (10, alpha1*n) + "%*s" % (10, alpha1*n)
           if n < 0:
                break
        m = 0
        while alpha1:
           m += 1
           print "%-*s"
    ...
    See more | Go to post

  • Jane Janey
    replied to Python symmetric words
    python symmetric words

    I have to write a function which takes one arguments text containing a block of text in the form of a str, and returns a sorted list of “symmetric” words. A symmetric word is defined as a word where for all values i, the letter i positions from the start of the word and the letter i positions from the end of the word are equi-distant from the respective ends of the alphabet. For example, bevy is a symmetric...
    See more | Go to post

    Leave a comment:


  • Jane Janey
    started a topic Python least characters function

    Python least characters function

    I have to write a function which takes one argument text containing a block of text in the form of a str, and returns an alphabetically sorted list of word(s) with the lowest “vowel proportion” as a list. The vowel proportion is defined as the proportion of letters in the word which are vowels (e.g. the vowel proportion of "life" is 2 = 0.5).
    See more | Go to post

  • Jane Janey
    started a topic Python symmetric words

    Python symmetric words

    How do I write code to find words that are in the same specified position in a string. The position should be like this:

    Code:
    word1= ('a','b','c','d','e','f','g','h','i','j','k','l','m')
    word2= ('z','y','x','w','v','u','t','s','r','q','p','o','n')
    
    word1[n] == word2[n]
    An example:

    Code:
    text = "A boy is being bully by Aloz"
    And it will return the result:

    ...
    See more | Go to post
    Last edited by bvdet; Apr 19 '13, 03:19 PM. Reason: Change thread title
No activity results to display
Show More
Working...