15,185 Topics

Member Avatar for
Member Avatar for vegaseat

I thought it would be fun to code all the different ways to show Hello World on the display. Let's start simple ... `print("Hello World")` Can anybody print out "Hello World" vertically?

Member Avatar for ZZucker
1
904
Member Avatar for matjojo

I tried to make a way to let the user choose to which piece of the program it would go, i first tried *for* but later went and used *if*, this is the code: while True: whichcode = 1 #set the variable for the first time. while True: if whichcode …

Member Avatar for matjojo
0
193
Member Avatar for matjojo

!python3! so i was trying to get a for loop to work to get a program to choose which part of the code it had to run, this is what i have: while True: whichcode = 1 #set the variable for the first time. for whichcode == 1: print code …

Member Avatar for matjojo
0
242
Member Avatar for karmstrong

I am attempting to convert a C application to python. I am having difficultiy on this particular for loop. Any ideas how I might proceede? bool Enigma2C::encrypt(char *inString, char *outString) { int16 csum = 1, checksum = 0; int16 tmpSum = 0; int16 i = 0; strcpy(m_keyCode, inString); // Calculate …

Member Avatar for Leslie_1
0
631
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
470
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
522
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
360
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
949
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
440
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
138
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
341
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
590
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

The End.