15,181 Topics

Member Avatar for
Member Avatar for Courtney_1

HI, I'm having some trouble with this program - its supposed to return an acronym based on the input of the user: It prints three of the same letter instead of the acronym. Any help would be much appreciated. def acronym(phrase): a = "" for words in phrase.split(): a = …

Member Avatar for TrustyTony
0
6K
Member Avatar for fonzali

well , I just realised that we forgot about our " turtle " so here it is printing " hello world " from turtle import * title("hello world") shape("turtle") speed(2) color("blue") write('hello world',align = 'center', font=('imes New Roman', 36,'bold')) done()

Member Avatar for fonzali
1
120
Member Avatar for maria anna

But i want steganographic plugin in python language.This link http://registry.gimp.org/node/25988 shows the steganography plugin in c language. please help me to find a steganographic plugin in python

Member Avatar for chriswelborn
0
101
Member Avatar for karmstrong

I have a list in python that I am printing to the screen. The current format is Option Key: [0, 3, 6, 8, 8, 5, 2, 0, 7, 1, 9, 5, 0, 7, 7, 4, 2] I would like it to be Option Key: 0 3688 5207 1950 7742 I …

Member Avatar for vegaseat
0
478
Member Avatar for XxAaronxX

Hey Guys, Ive been having a bit of trouble with a program which rolls dice for the game risk. Ive been able to implement number of dice choice selection for both attacker and defender, and to get them to roll the results. The part I am trying to implement now …

Member Avatar for XxAaronxX
0
468
Member Avatar for Tcll

As the title implies, what I want to do is create main.py and have it open a window. after the window is open, I want to edit main.py, and when finished editing, hit File -> Reload in the window's menu bar. what's expected is for the window to update with …

Member Avatar for Tcll
0
12K
Member Avatar for karmstrong

In python if I know the volume label of a USB mass storage device is there a way to get its. Drive letter Windows Mount Point Linux Mount Point OSX Originally I was thinking either the sys library or the os library. i ahve found another library called PYUSB. Still …

Member Avatar for vegaseat
0
5K
Member Avatar for Shalu.23

how to dynamically insert keys into an existing python dictionary, input is the .json file and the output in a .csv file. this is the input in the .json file [{"FIRSTNAME":"barc","EMAIL":"jahg@jh.com","ADDRESS":"gyuyj"}, {"FIRSTNAME":"rth","EMAIL":"tht@thuyj.com","ADDRESS":"ytju"}, {"FIRSTNAME":"trhy","EMAIL":"klo@pyu.com","ADDRESS":"trght"}, {"FIRSTNAME":"ghy","EMAIL":"ytj@uki.com","ADDRESS":"ukyk"}] output is required as .csv file(in each row its specified columns should be added) "FIRSTNAME":"barc","rth","trhy","ghy" "EMAIL":"jahg@jh.com","tht@thuyj.com","klo@pyu.com","ytj@uki.com" …

Member Avatar for vegaseat
0
253
Member Avatar for G_S

Hello everyone. I am currently making some database connection modules in Python inb order to learn Python's approach to OOP and also to lear how to connect to databases via Python. I successfully made a package with modules for postgres, mysql, sqlite3, and MongoDB. The classes simply connect, disconnect and …

Member Avatar for Gribouillis
0
520
Member Avatar for cjohnweb

Hello! I'm working on a program at work for a device we are building, it's a device that (basically) in real-time reads in sensors, makes decisions about said data, and performs output. I have a loop that runs, and then calculates how long to sleep, so we can get as …

Member Avatar for vegaseat
0
359
Member Avatar for Edward_6

def main(): print ("-------------------------") print ("Program computes your BMI") print ("-------------------------") while weight == float(input("Enter weight in pounds: ")) while height == float(input("Enter height in inches: ")) if weight <= 0 or weight > 500: print ("Weight cannot be less than 0 or greater than 500") continue elif height <= …

Member Avatar for vegaseat
0
199
Member Avatar for FraidaL

A few months ago someone figured out how much money to put on a metrocard so that you end up with a zero balance instead of random amounts on your balance that you need to figure out how to even out or just throw away and lose that money. Now …

Member Avatar for David W
0
138
Member Avatar for nuaris

How do I read a .txt/.csv file from an internet address? For example: http:\\[url]www.internetaddress.com\file.txt[/url] I don't think file() would work for this. Thanks

Member Avatar for snippsat
-1
5K
Member Avatar for joshuawilson11

hi, soat the moment i am writing an encryption program, i am not quite sure how to use for loops for lists, my list at the moment is this: **Somewhere in la Mancha, in a place whose name I do not care to remember, a gentleman lived not long ago, …

Member Avatar for joshuawilson11
0
189
Member Avatar for vegaseat

The Tkinter GUI toolkit's canvas object is very nice for all sorts of drawings and plotting. However, when it comes to saving the image Tkinter limits you to postscript printer files. One solution is to draw the same image in parallel on PIL's image-draw object in memory. This is made …

Member Avatar for MatthiasBl
4
19K
Member Avatar for AnthonyJbs

Hello, I have created pretty simple voice chat with pyaudio, but the voice is kinda meh. You hear usually some noise like in the old movies. It is probably caused by missing CHUNKs of voice which I send over UDP. Is it possible to somehow reduce the noise? Further I …

0
933
Member Avatar for Niloofar24

Hello. I was looking for a tutorial or any example of creating web crawler that i found this code somewhere and copied and pasted to test it: First, it is a web crawler, right? Because when i gave it a url of a website, the output was some linkes were …

Member Avatar for vegaseat
0
438
Member Avatar for joshuawilson11

Hi so in my list i have multiple characters - '32' which i need to replace with a space, would anybody be able to give an example of how to do this? Thanks

Member Avatar for vegaseat
0
137
Member Avatar for fatalaccidents

Hello all, I'm hoping this is related enough to python to merit being posted here. I'm hoping someone will possibly have a better way of doing it altogether. I'm using tetgen to try to create a hollow dome. I was using triangle and then just triangulating a circle and raising …

Member Avatar for fatalaccidents
0
2K
Member Avatar for joshuawilson11

Hi,so I am supposed to encrypt a text file chosen by a user at the moment I have completed most of it (offset factor/shift), I have got each separate character from the text file and put it into a list and converted it into ASCII, I am wondering how you …

Member Avatar for joshuawilson11
0
505
Member Avatar for Kristal_1

Can someone please give me an example code for a tkinker GUI of a reverse polish notation calculator written in python.

0
150
Member Avatar for jeffcogswell

People who know me know that Python has always been one of my favorite languages. And over the years, I've been pleased with the array of development tools that have been created for it, including the different IDEs. I also do a lot of work in .NET, primarily with C#. …

Member Avatar for Tcll
3
2K
Member Avatar for BustACode

I just love generators in Python. One of the cool things I found out from [this](http://nedbatchelder.com/text/iter.html) site was that one could send in a value when calling on an active generator. To do so one uses the send() method and a yield like so: "x = yield". The send with …

0
339
Member Avatar for Ragunath_1

I want to automate an application developed in java and swing controls using python. I tried pywinauto but it is not able to detect java objects. I tried using QTP but my applications dynamic java windows dosen't hava parent window so not able to use it . Any suggestion of …

Member Avatar for vegaseat
0
67
Member Avatar for Niloofar24

Hello my friends. Look at this please: >>> from bs4 import BeautifulSoup >>> import urllib2 >>> url = urllib2.urlopen('https://duckduckgo.com/?q=3D&t=canonical&ia=meanings') >>> soup = BeautifulSoup(url) >>> links = soup('a') >>> print links [<a class="header__logo-wrap" href="/?t=canonical" tabindex="-1"><span class="header__logo">DuckDuckGo</span></a>, <a class="search__dropdown" href="javascript:;" id="search_dropdown" tabindex="4"></a>, <a href="https://duckduckgo.com/html/?q=3D">here</a>] >>> I used this `https://duckduckgo.com/?q=3D&t=canonical&ia=meanings` as the url, …

Member Avatar for vegaseat
0
589
Member Avatar for Niloofar24

Hello! How can ask my scipt to print **every word** in a url page that starts with the letter "A" in this case? This is my code: from bs4 import BeautifulSoup import urllib2 url = 'http://www.thefamouspeople.com/singers.php' html = urllib2.urlopen(url).read() soup = BeautifulSoup(html) for word in soup.text: if soup.text.startswith('A'): print soup.text …

Member Avatar for vegaseat
0
491
Member Avatar for CodeWarrior14

I have written a simple message encoded that encodes messages into words of 4 characters each. It generates a key that will later be used to decode the message. The key is a list of numbers. The numbers are the original whitespace positions before the encoding started. The problem: My …

Member Avatar for vegaseat
0
350
Member Avatar for vegaseat

We have had several snippets on the format() function. This one gives a condensed overview of the many options you have.

Member Avatar for BustACode
6
928
Member Avatar for CodeWarrior14

Hello. I am was doing research on cryptography and found a simple algorithm (One time pad algorithm) that interests me. I was able to create a simple version of this that only works with capital letters. The problem however is that the encrypted contents doesn't only contain capital letters. It …

Member Avatar for vegaseat
0
371
Member Avatar for Mate_1

Hi guys, I'm stuck on this. I'm trying to draw 2 triangles in Turtle (not what you think). I'm trying to get it to look like this: http://gyazo.com/5abdd3bc05a44945f1a74286e2ad43c6 What I have: http://gyazo.com/65357ea5d43a7dc49e89879a27e980b4 Code: forward(200) left(120) forward(200) left(120) forward(200) right(120) hideturtle() done() Any help is greatly appreciated!

Member Avatar for vegaseat
0
982

The End.