15,190 Topics

Member Avatar for
Member Avatar for e-papa

Please I downloaded the latest version of python QT but I've been unable to use because i don't know how, help from the experts in the house. Thanks in advance

Member Avatar for e-papa
1
875
Member Avatar for e-papa

It solves quadratic equations, for both real and complex roots. Please answer the pol to let me know how I'm doing. This function just needs the python 3.x environment, no modules needed.

Member Avatar for e-papa
0
4K
Member Avatar for ThePythonNoob

(Python code 3.0) I have been trying to make it that when you the number it will loop around, I tried this: If guess==num: #this is randomly generated number ask for yes or no the playagain if answer==yes replay=1 play_guess==0 if replay=1 play=("yes") however this does not work, please could …

Member Avatar for richieking
0
121
Member Avatar for Jerix

Hey, I'm trying to write a program right now with the following requirements: 1. Read a CSV file for field ID#. 2. Compare it to a second CSV file for the same ID # 3. If Csv1ID == Csv2ID, write the rows from both files to outputfile. So basically I …

Member Avatar for TrustyTony
0
503
Member Avatar for parijat24

Hi , I have interesting problem as I have a file 'A' which looks like [CODE]>BIG_CLUSTER96 ENSTNIP00000002777 TETRAODON8 1 [COLOR="Green"]105[/COLOR] 136 [B]Ank[/B] [COLOR="red"]NGCTPLHYAASKDRYEIALMLLENGADPNATD[/COLOR] >BIG_CLUSTER96 ENSTNIP00000002777 TETRAODON8 1 [COLOR="Green"]141[/COLOR] 169 [B]Ank [/B] [COLOR="red"]TPLHRASAKGNYRLIQLLLRQSASTNIQD[/COLOR] >BIG_CLUSTER96 ENSTNIP00000002777 TETRAODON8 1 [COLOR="Green"]172 [/COLOR] 202 [B]Ank [/B] [COLOR="Red"]GNTPLHLACDEERVEAAKLLVEHGASIYIEN[/COLOR] >BIG_CLUSTER96 ENSTNIP00000002777 TETRAODON8 1 [COLOR="Green"] 40 [/COLOR] 71 …

Member Avatar for TrustyTony
0
194
Member Avatar for e-papa

I tried to find the square root of a negative number while writing a function to solve quadratic equations but the interpreter said something , it said math domain error, what does this mean. Even though I've been able to solve the quadratic equation using complex numbers and i will …

Member Avatar for e-papa
0
19K
Member Avatar for bioplanet

Hi all, I have the following script for creating scatter plots and I was wondering if there is a way of adding the legends also for each dot in the plot (i.e. Method1, Method2 etc) [code] #!/usr/bin/env python import sys,re,os; import matplotlib as mpl; import matplotlib.pyplot as plt; datafile = …

0
103
Member Avatar for Ephexeve

I've been looking for an exercise book for Python, a book that we get some stuff to code, like ideas, and etc. I have already finished the "Invent your own computer games with Python". Is there any other book? Thanks in advance.

Member Avatar for Ephexeve
0
227
Member Avatar for vbx_wx

I want to open a process in the background and it should be invisible in both Linux and Windows. I made something like this, but I don't know the console still appears on the screen: [code] command = "cmd /C dir c:\\" startupinfo = None if os.name == 'nt': startupinfo …

0
55
Member Avatar for mang0

I just recently (one week ago) started learning Pyton. I'm using 2.7 as I heard that is best for begginers. I am also following a manual, which is really helpful! The one problem with manuals is that it's very easy to just type whats written and not understand it at …

Member Avatar for e-papa
1
159
Member Avatar for e-papa

Well just run, the only thing is that this is created using python 3.x. no modules required.

Member Avatar for e-papa
0
717
Member Avatar for e-papa

Is python 3.2 stable yet, because i use portable python v1.1py3.0.1, so far I'm making improvement, but I have problems loading modules, how do I go about it.

Member Avatar for e-papa
0
920
Member Avatar for e-papa

Please i just downloaded the latest version of pygame, but I've been finding it difficult to install, okay when i unpacked it, everything came up, but i don't know which should go to which. Python experts in the house what do i do.

Member Avatar for e-papa
0
175
Member Avatar for joeywheels

I'm trying to create a vertical histogram using only built-in modules. I understand the current histogram function isn't truly a histogram (and the code is probably very ugly), but I'm totally lost on how to create a vertical histogram. [CODE]import itertools def histogram(s): print("Histogram:") print("%s %7s %12s" % ( "No.", …

Member Avatar for TrustyTony
0
1K
Member Avatar for sbiren

[CODE]def main(): i=input() print(i+1)[/CODE] (I use PYTHON 3.2) Why i get an error converting message ?

Member Avatar for richieking
0
172
Member Avatar for coconutdumplin

Hi guys this is my very first python program I've been trying to use re.match to test to see if a string is an identifier as defined by this syntax [CODE]identifier -> letter{ letter| digit}[/CODE] I tried the following statements but when i test my program every single time it …

Member Avatar for coconutdumplin
0
114
Member Avatar for Simplified

Hello all I'm having a few issues with a Python program in that I am performing decimal calculations on and most values come up as desired, however every so often, when there is a very small decimal, the number is represented like "6.80E-7" rather than the desired "0.000000680". Here's a …

Member Avatar for Simplified
0
213
Member Avatar for jordan0420

i am currently running Mac OS 10.5 and i have written and fully debugged (nothing in the command line) a large python script. i am wondering how am i able to create an app for the program. i do not understand the lingo of how to install different libraries and …

Member Avatar for e-papa
0
128
Member Avatar for xleon

[CODE]from Tkinter import * master = Tk() def ChangeOpt1(): Options.option_clear() Options.option_add("Apple","Orange","Melon") Options.update() def ChangeOpt2(): Options.option_clear() Options.option_add("Milk","Water","Juice") Options.update() Option1=Checkbutton(text="OPTION1",indicatoron=0,command=ChangeOpt1) Option1.pack() Option2=Checkbutton(text="OPTION2",indicatoron=0,command=ChangeOpt2) Option2.pack() variable = StringVar(master) variable.set("You have to check an option") Options= OptionMenu(master, variable, "You have to check an option") Options.pack() mainloop()[/CODE] I want to do that when I clicked Option1, …

Member Avatar for xleon
0
4K
Member Avatar for Voidz

Hi DW, I'm extremely new to DaniWeb. I have been coding in C++ for about one month. I'm thinking about coding in Python too. But, I'd like to ask some newbie question's about it first. [B]I'd like to know what it's used for.[/B] [I]I think it's mostly used for web …

Member Avatar for e-papa
0
276
Member Avatar for e-papa

[CODE]#this function checks if a number is a prime number, #if not it outputs the lowest factor. def isprime(n): """Determines whether a number is a Prime number, Takes a single arguement n, which is the number""" if n==1: return 'Not a Prime number, only has one distinct factor' elif n==2: …

Member Avatar for e-papa
0
220
Member Avatar for dustbunny000

I have this code: [CODE]protein="GWEIQPYVWDECYRVFYEQLNEEHKKIFKGIFDCIRDNSAPNLATLVRVTTNHFTHEQAMMDAVKFSEVLPHKKMHRDFLEKLGGLSAPVDNHIKGTDFKYKGKAKNVDYCKEWLVL" pp="LLCCCCCCCCCCCCCCCCCCHHHHHHHHHHHHHHHHHCHHHHHHHHHHHHHHCCCCHHHHHHHCLLLCCCCCHHHHHHHHHHHHHHHHHHHCCCCCCCCCCCHHHHHHHHHHHHCCL" gor="cccccccccccchhhhhhhhhhhhhhhhhhhhhhhccccccccceeeeecccccchhhhhhhhhhhcccchhhhhhhhhhhhhccccccccccccccccccccccceeceeccceec" aber="CCCCCCCCCCCCHHHHHHHCCHHHCHHHHHHHHHHCCCCHHHHHHHHHHHCCCCCCHHHHHHHCCCCCCCHCCHHHHHHHHHHCCCCCCCCCCCCCCCCCCCCCCCCCHHHHHHHCC" for i in range(len(protein)): print i+1,protein[i], pp[i], gor[i], aber[i] [/CODE] I'm trying to compare these strings. However, the output is in a vertical format. How can I print it so that the format is vertical? This would make it much easier to …

Member Avatar for jice
0
231
Member Avatar for e-papa

This is a program that can calculate, the GPA of a student on a 5.0 scale,it's written in python 3.x and no modules are required.

Member Avatar for TrustyTony
0
6K
Member Avatar for dos_killer

i am tryin to create an app that should make my cellphone work as a webcam ... there are softwres like smart cam for that... also there is an app like mycam that lets you use a gif and create a vistual cam ... i want to know how an …

Member Avatar for dos_killer
0
108
Member Avatar for khaos64

I had recently made a .bat file that read a couple lines from file.txt and assigned them as variables then went through the execution of the bat which ended up deleting the original file.txt and writing the new values to a new file.txt. Now I want to convert this to …

0
120
Member Avatar for banannamoofin

I am currently having problems displaying a file correctly once i have written a dictionary to the file. For this program the input file needs to have the format: ID: Date: Dayskept: ProductName e.g. 1:12/12/2011:12:A This is fine the first time I read the example file into a dictionary, but …

Member Avatar for TrustyTony
0
209
Member Avatar for elbib84

hi, am trying to parse a multiple pairwise format into table for example: Query= m100529_140129_SMRT1_c0000010190006406181231110_s0_p0/32965/0_332_clipped_50:0 (282 letters) Query: 8 TTTTTGAACAGCCCCAACAACTCTTCCGCTGCCGGTTGCTGCA-TTCCAGTTGTTCCACA 66 ||||||||||||||||||||||||||||||||||||||||||| |||||||||||| ||| Sbjct: 4045830 TTTTTGAACAGCCCCAACAACTCTTCCGCTGCCGGTTGCTGCACTTCCAGTTGTTC-ACA 4045772 Query: 67 GTCCAGCTCCAGTTCAACGTCGGTTTAAATCGTCG--AGCT-GTATGAGAGATAAGCATA 123 | ||||||||||||||||||||||| |||||||| |||| |||||||||||||||| | Sbjct: 4045771 GGTCAGCTCCAGTTCAACGTCGGTTTTAATCGTCGCCAGCTGGTATGAGAGATAAGCA-A 4045713 Query= m100529_140129_SMRT1_c0000010190006406181231110_s0_p0/56521/6_684_clipped_527:0 (151 letters) Query: 1 CTTCAAAGAGGGAGAATTACGTCGATATTACCGAAGGCTGGGAGAAGGGTGAAAATACAA 60 …

Member Avatar for griswolf
0
151
Member Avatar for bwbyron

Obviously, here is the initial code for this blackjack game. and in order for me to feel confident in this game I need to have an error check to make sure that there are at least 7 cards per player. And I have to do this in the second part …

Member Avatar for woooee
0
316
Member Avatar for alokdhari

My tutor suggested me to use deep copy for copying tuples for pawn-chess game... can anyone help me out with how actually deep copy works ?? coz if i know it i can work it out in a more smoother way... n yea... m new to python !!

Member Avatar for alokdhari
0
206
Member Avatar for vegaseat

Crypting with xor allows one to write one function that can encrypt and decrypt a file. In this example a text file is used, but it could be an image file as well. Once you have created the encrypted file you simply send it through the same function again to …

Member Avatar for TrustyTony
3
7K

The End.