15,181 Topics
| |
hi, right now i'm working on a program that prints parabolic shapes on the screen. And i want to be able to type a formule, and than i need python to understand that formule :? I have heard from many people that this is extremely hard But is there a … | |
program takes 2 integers and then finds how many divisors each integer between the original 2 has. then prints out which number has the highest number of divisors. any help is appreciated. im just starting to learn this stuff | |
I cant seem to figure this out. I need to write a while loop to output the numbers from 1 to 10, but no matter what I put it will not run. Here is what I have been stuck on: a = 0 while a < 10 : a += … | |
if a file that has multiple columns, like [CODE]1 7 3 8 5 6 3 4 5 6 7 8 1 7 6 4 4 3[/CODE] i want to read the first row and see if there numbers that are grater than 6. Then add that number to all the … | |
Learned about hook functions [URL="http://www.daniweb.com/software-development/python/threads/383164/1650339#post1650339"]for a thread[/URL] having problem with bad user input from the documentation. This is result which skips bad inputs. | |
Hello everyone I am new programmer ,and i decided learn python and i learned basics in python and i have read book 'Think python' , and other books But now i look to develop my level , and i ask you how can i do that? thank you | |
Hello! could i ask where there's any error in my code for testing prime numbers? cos i tried testing 21 and 49, and they were tested as prime. thanks! [CODE]import math y = int(raw_input("Please input a number: ")) if y < 2: print "It is not a prime number." elif … | |
Hi, I am brand new to programming all together and was kind of thrown into a programming class without much help and I have struggled with my homework for this week. I have to create a code to write an ASCII table using Python 2.6 . Here is the actual … | |
Hi I am busy working with biological sequences, but I am having some problems to finilize my script Let's say that I want to compare two dna sequences i.e seq1='ATGGAGGCAATGGCGGCCAGCACTTCCCTGCCTGACCCTGGAGACTTTGACCGGAACGTG CCCCGGATCTGTGGGGTGTGTGGAGACCGAGCCACTGGCTTTCACTTCAATGCTATGACC TGTGAAGGCTGCAAAGGCTTCTTCAGGCGAAGCATGAAGCGGAAGGCACTATTCACCTGC CCCTTCAACGGGGACTGCCGCATCACCAAGGACAACCGACGCCACTGCCAGGCCTGCCGG CTCAAACGCTGTGTGGACATCGGCATGATGAAGGAGTTCATTCTGACAGATGAGGAAGTG' seq2='ATGGAGGCAATGGCGGCCAGCACTTCCCTGCCTGACCCTGGAGACTTTGACCGGAATGTG CCCCGGATCTGTGGGGTGTGTGGAGACCGAGCCACTGGCTTTCACTTCAATGCTATGACC TGTGAAGGCTGCAAAGGCTTCTTCAGGCGAAGCATGAAGCGGAAGGCACTATTCACCTGC CCCTTCAATGGGGACTGCCGCATCACCAAGGACAACCGGCGCCACTGCCAGGCCTGCCGG CTCAAACGCTGTGTGGACATCGGCATGATGAAGGAGTTCATCCTGACAGATGAGGAAGTG CAGAGGAAGCGGGAGATGATCCTGAAGCGGAAGGAGGAGGAGGCCTTGAAGGACAGTCTG CGGCCCAAGCTGTCTGAGGAGCAGCAGCGCATCATTGCCATACTGCTGGACGCCCACCAT AAGACCTACGACCCCACCTACTCCGACTTCTGCCAGTTCCGGCCTCCAGTTCGTGTGAAT GATGGTGGAGGGAGCCATCCTTCCAGGCCCAACTCCAGACACACTCCCAGCTTCTCTGGG GACTCCTCCTCCTCCTGCTCAGATCACTGTATCACCTCTTCAGACATGATGGAC---TCG' Thus my aim is to identify … | |
Problem 4 – makeScarf(scarf) Let’s knit a scarf! With Python today we are knitting recursively. Your main program should be contained in a recursive function called makeScarf() which takes a string: your scarf that will be printed out in the end. You may use other helper functions as needed, but … | |
Hello, I have been looking at using Beautifulsoup python module to make changes to some static html files a total of 167 files, but being a newb in programming was wondering first how to open, read/process the file, then write it, close it and then open the next file thus … | |
hello great community of developers, I have a problem with my code. I am new ... wx.panel want to put () to the main mdi window code. and I would like to know how to open and close a main module is mainly run and then open medi.py nada.py and … | |
Hi I am using cli parser script to build a user interface, in pythin script i want to use the linux system calls but facing problem. I am calling system("./abc.sh'); please help!!! | |
Im using pexpect to output some terminal commands, but im facing the following issue. The code is [CODE]porttype = "Gi" print expectSw.sendline ("sh int counters errors | i %.*/1 ") % porttype expectSw.expect ('.*#') print expectSw.after[/CODE] But when I run the code i get ... [CODE]Traceback (most recent call last): … | |
Write an expression whose value is the result of converting the str value associated with s to an int value. I tried typing int('s') in python2.7, and I got an error. | |
Inspired by password entry discussions, I did this simple entry. You must of course find safe way to store the passwords, for example hashlib ([url]http://stackoverflow.com/questions/4820043/basics-of-python-encryption-w-hashlib-sha1[/url]) or [URL="https://www.dlitz.net/software/pycrypto/"]PyCrypto[/URL] and replace the simplistic example match for real life usage. The print at line 23 is just to check the attempts and to … | |
The [URL="http://pypy.org/"]PyPy [/URL]development team has announced the release of version 1.6 of its "very compliant" Python interpreter with integrated tracing just-in-time (JIT) compiler. According to the developers, the latest update fully implements Python 2.7.1 and brings speed and stability improvements. Code-named "kickass panda", PyPy 1.6 is said to be between … | |
hello friends i just start learning Python and i am going through book "how to think like a computer scientist", in forth chapter it start using "GASP" which needs to be installed and book totally ignored the need of a newbies regarding installation. so after some mucking around i did … | |
I know this is like an idiot question, but i'm like totatlly stumped by it for some reason. First and foremost, i'm a total newbie at coding(1st month and would be grateful if someone could at least help me with the first part of the project to help me get … | |
I have been trying to create a program that asks for a username and password, and if the user gets it right exits the program, if they get it wrong asks again, and if they get it wrong again logs out of the system. TWO QUESTIONS: 1: is this possible? … | |
i am trying to do this consider a=[[(34,5),(34,6)],[(35,5),(35,6)]] b=[(36,5),(36,6)] i want to put elements of b in a so i do a.append(b) now if i do b.pop() why does it effect a? a ends up being `a=[[(34,5),(34,6)],[(35,5),(35,6)],[(36,5)]]` WHY?? is there a way around it?? i don't think i had this … | |
Why does this return None? [CODE]list1 = ['Herring','used','to','be','abundant','in','the','AtlAntic','Ocean','then','herring','got','overfished'] print list1.sort(key=lambda s : s.count('a'))[/CODE] | |
everytime i click to open one it says it cannot open the file and when i search for a program online to open it none come up wat do i need to open it thanks all for your help | |
I am trying to use the fileinput.input() module to read in the lines from a bunch of files in a directory and occasionally receive an IOerror exception. What is the best way to handle this exception so that if 1 of the items in the list i'm feeding fileinput,input() generates … | |
Greetings, I'm a python newbie struggling with the obvious. I have a txt file with fixed width whitespace between the elements. Excel can't import directly because the size of the whitespace varies between columns. I have stripped the header out leaving only data. This is the code I've tried to … | |
Hey everyone, I've been using python quite a bit to develop scientific applications. As of late, the Enthought Tool Suite is proving to be one of the handiest set of development tools out there. One question I have is, with commercial software, I often see the ability to plugin output … | |
Hi, I'm trying to code a little Python script using the PyHook library. My script prints in the program every key pressed by the user, and the name of the window where he did it. But what I want for the program to do is to print the name of … | |
Write a program that prompts the user for their monthly deposits and withdrawals from their checking account. After each transaction, output the balance and the amount withdrawn or deposited. At the end of the program, output a formatted table of the transactions. Use the Python format function to only display … | |
Hi, i don't know how to start with this problem. Lets say i have 6 random letters in any order, "mnador" and i need to find all words those letters can make e.g. "random", "roam", "man", "and" etc. from a wordlist.txt that i have. Any tips? | |
The short of it is that I have a widget, with source, written in Tk, specifically an analogue gauge, that I would like to use in a TKinter gui. Is this even possible? If so, how? Thanks for any insight you might have. |
The End.