User Profile

Collapse

Profile Sidebar

Collapse
jackie123
jackie123
Last Activity: Nov 29 '15, 10:54 PM
Joined: Nov 3 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • program output

    yes here it is, it prints out a very large portion of the website source, but i only need it to print the cost in US$ of whatever argument is passed through it.
    I would like to note the output is about 5x longer than this but only posted the very beginning and end because it would not let me post the reply otherwise.
    ======= Loading Program =======
    Code:
    >>> howMuch("Austrian")
    The
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 28 '15, 04:44 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Leave a comment:


  • Getting a specific value from a website using python, takes an argument

    Code:
    def money(coinPrice):
      import urllib
      connection = urllib.urlopen("http://www.usagold.com/gold/price.html")
      rate = connection.read()
      connection.close()
      currentLoc = rate.find("> coinPrice </A></div>")
      if currentLoc != -1:
        rateLocEnd = rate.rfind('</TD>', 0, currentLoc)
        rateLocStart = rate.rfind('<TD width = "50">', 0, rateLocEnd)
    ...
    See more | Go to post
    Last edited by jackie123; Nov 27 '15, 09:31 PM. Reason: small error in code

  • yes i know that endswith() would work best but it is not allowed in this program. How would I go about fixing what I have above?
    See more | Go to post

    Leave a comment:


  • look at file type and determine if the type is correct, print statement, python

    working on a program that takes a file and determines what type it is. It must be a .wav or .jpg file to be correct, and if it is not one of those, it will display a message that says to choose a correct file type. However, I am stuck on how to get it to determine what type of file is being chosen, since for this program I am not allowed to use f.endswith()
    I have tried something like this but it is giving me a syntax error for the line "if...
    See more | Go to post
    Last edited by jackie123; Nov 11 '15, 05:02 AM. Reason: changing code and updating explanation

  • right, I am just not sure on how to incorporate that into my program.... I could get it to do the top third but that was as far as I got, and I need to top third to be untouched. With the middle third red and the bottom third yellow.
    See more | Go to post

    Leave a comment:


  • Changing 1/3 of a picture to different colour using python

    I have some code so far, but I need it to only be applied to the bottom third of a photo, it is taking all the black spots in a photo and changing them to yellow. I just need it to only be applied to the bottom 1/3 of the photo. Here is the code I have right now:
    Code:
    def change(pic, startX, startY, getHeight, getWidth, endColour): 
      width = getWidth
      height = getHeight 
      picture = makePicture(pic)
      for px in getPixels(picture):
    ...
    See more | Go to post
    Last edited by jackie123; Nov 3 '15, 09:00 PM. Reason: making code appear correctly
No activity results to display
Show More
Working...