15,195 Topics
![]() | |
Hello all, I have been doing some work on my HTML editor lately, and I have come to a (what seams like a) dead end. The file its self is about 3.7kb smaller than my text editor, ProssesIT, and yet it fails to run any where near as smoothly. When … | |
Im really new to Python and I just learnt about Quadratic equations in maths, and so i made it made it my project to make a quadratic solver. But i have a problem i have a line [iCODE]if tocontinue == n:[/iCODE] I try to run it in IDLE and i … | |
Here's my code: [CODE]metres = float(raw_input("Enter the height (in metres): ")) total_inches = 39.37 * metres feet = int(total_inches/12) inches = int(round(total_inches - feet*12)) if inches < 0.5: print "Sorry, you have entered a height that is less than 1/2 inches," \ " please re-enter a new height." elif feet … | |
I've got the codes all done; so its looks like this: [code]public class RightTriangle { public static void main(String[] args) { Triangle shape = new Triangle(); shape.setBase(4.0); shape.setHeight(5.0); System.out.println("The base of the right triangle is " + shape.getBase()); System.out.println("The height of the right triangle is " + shape.getHeight()); System.out.println("The area … | |
I had asked this question and thought that I had it solved but I could not get the text defined as variables. Below is the text file. I would like to specify a line and the length and set that to a variable. In the Example below the items in … | |
![]() | Hi all, for some time now I have been trying to practice developing python games and I've had a really annoying problem. I want to use image files but most of the time the picture itself is not a regular rectangle but an oval etc. and the thing that I … |
hi I'm trying to write a game where I play against the computer...and as u see below..I really suck at it.. can someone pleeease help me..I want it to be as simple as possible.. thanks input random game = raw_input("Your turn. Input the coordinate for your move on the form … | |
Can someone help me with this, if I run ftp, the page is downloaded and showed well, but the progress bar only shows 100% and doesn't progress at all.. [code] def progress_timeout(pbobj): # Calculate the value of the progress bar using the # value range set in the adjustment object … | |
hi, i want to develop the web frame work using django in python on Mac OS.so how to install django on mac . how to use it and test it.. can u tell me the process from installation to run the application.. | |
Hi all. i want to make separate process with python. for example i have python code. for example: [code] import time time.sleep(5) print "Time Over" [/code] named: t.py and i want to do all ^^that^^ just on other process :) i hope you understand. AND DONT GIVE ME LINKS PLS. … | |
hiya, pls I need help using this matrix function linalg.solve_banded with python(xy) or python 2.5.4 Used it in school with python version 2.5.2 but it just does not work with version 2.5.4 and I cannot figure out the real problem. Help please, | |
ok so im making a program that finds postage rate according to its weight and category. The category is standard for weights under 50g and other for over 50g. If the user enters a weight out of its category it will say error and close. and it only works for … | |
I am having a hard time identifying numbers in a text. Is there a way to recognize numbers? | |
Hi everyone! I'm a student taking an introduction to Python programming class and I'm in URGENT need of some help! Basically the program I need is to compute the "numeric value" of a name. Ex. a = 1, b = 2, c = 3, etc. So name abc = 6. … | |
[CODE]# This file contains python code that will determine whether a potivie range # of integers entered by the user will contain odd or even numbers, prime or # composite numbers, perfect/abundant/deficient numbers, square numbers, and # triangular numbers. def main(): import math firstNum = 0 secondNum = 0 n … | |
Hi guys, I got a file having this kind of records: 000000000111GOOGLE 5428[B]MG[/B]45525[B]RC[/B] 000000000122MICROSOFT 8565[B]MG[/B]85454[B]RE[/B] 000000000044APPLE 5814[B]KL[/B]484545[B]RC[/B] I want to keep only the records that have 'MG' in position 34 and NOT ('RE' or 'RD') in position 41 What should I add to this code? #!/usr/bin/python infile = 'DATA' input … | |
Hi I was hoping I could get a bit of help here. I am trying to break a number of strings up into arrays on particular words. For example in the following strings I want them broken on the words GET and/or POST: [CODE] "POST at the start without the … | |
Tired of the Tk icon in the corner of the form. It's easy to replace with any fancy icon you have. Here is the code ... | |
In the code below, the only part I'M having trouble with is word[position]. I know this is something really simple but I've always had trouble understanding these kinds of statements. I know that it print a random letter (position) from (word). What I don't know is why or how it … | |
I am trying to compute some lexical statistics from a given text. For instance, how many lines, sentences, words, how many times a given character is repeated. Can anyone help me with this? | |
Hi i'm having trouble adding a if statement to my code i have these two files in the same folder mud.world effect and simmind, in effect i have this class EffectIllusion, and i use the portion illusionRace, i ive been trying to add a condition that when illusionRace is active … | |
I'm to have the user input what classes they have taken and tell them what they have left to do. I have my for loop done but I feel like I need an array or something because they should have entered requirement for 6 different class types. Here is my … | |
lets say i have 2 lists: lista = [1,2,3,5,6,7] listb = [4,5,6,7,8,9,10] The lists can be different lengths, and may not allways be unequal lengths. The higher average will allways be in listb, so that is the 1 constant we can rely on. This works for even teams: [code] average … | |
Hi, I'm stumped at this problem set and was wondering if anyone could guide me in the right direction or give me some hints on where to begin. I'm not looking for a full answer. Q: Write a program that computes and prints the 1000th prime number. Any help is … | |
Hi all, I am using scipy.io for switching from python to matlab. here is my list of list in python code = [[[1, 2], [3,4], [5, 6]], [[7, 8], [9, 10]]]. I want to convert this to matlab format. For that I used a code scipy.io.savemat('/tmp/out.mat', mdict={'Num': (code[0], code[1])}) but … | |
Hi, I was wondering how to debug python script without adding pdb module to the script file. Say, I have a script test.py without adding "import pdb" and "pdb.set_trace()". Can I debug it in Python running in terminal by importing pdb there? How to set up breakpoints and start the … | |
Hi, I am fairly new at the whole programming racket and I am having trouble with an assignment for my computer science class. I know homework help is discouraged, I read that sticky, but I'm curious if I am missing a fairly simple mistake. The assignment is to make a … | |
Hi - I'm fairly new to python. I 've been trying to write some python code to read data from a serial port and convert it to be able to display as incrementing or decrementing numbers with a voltmeter image in the background. Any ideas on how i can flush … | |
[CODE]#Program to count number of specific vowels msg = input("Enter a message:") msg_lower = msg.lower() VOWELS = list(aeiou) msg_list = list(msg_lower) x = () for letter in VOWELS: x[letter] = msg_list.count(letter) for letter in x: print(a, x(letter)) print(e, x(letter)) print(i, x(letter)) print(o, x(letter)) print(u, x(letter)) [/CODE] I get an error … ![]() | |
i setup a cronjob to execute a script (following instructions here [url]http://moinmo.in/WikiBackup[/url]) basically their script just opens a browser to a page with a backup button. after digging, i found i could add &do=backup and it would click the backup button for me, but now it just stops at the … |
The End.