Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Trouble with edX Python Final
Post: RE: Trouble with edX Python Final

If this question is still open I'd like to mention a few points: You are calling adding_report(int_or_q) again in the function definition (line 21). There is no need for this and this would cause the ...
cryomick Homework 11 13,732 Jun-19-2018, 10:36 AM
    Thread: Problem with quotes on MySQL request
Post: RE: Problem with quotes on MySQL request

As per the MySQLdb documentation, you can use placeholders only for column names, not table names etc. You might want to go through this link (look for paramstyle) So you can take input from the user ...
cryomick Homework 7 4,410 Jun-19-2018, 09:57 AM
    Thread: Program does not end
Post: RE: Program does not end

Yeah, so look at it this way. You asked for an option, the user gave that, you printed out the corresponding text. All done, and done well. The program continues because you haven't given a condition...
cryomick Homework 3 3,195 Jun-18-2018, 08:11 AM
    Thread: Count Letters in a Sentence (without using the Count Function)
Post: RE: Count Letters in a Sentence (without using the...

The code you have written has almost all the correct elements, but it doesn't work for a few reasons: 1. 'lettersToFind' is a tuple and not a single letter. Ever. So your comparison condition always ...
cryomick Homework 3 5,167 Jun-18-2018, 07:58 AM
    Thread: programming homework
Post: RE: programming homework

I don't know if this is still open, but try moving the line print('They share {} at position {}.' .format(word_1[x], x))in to the "if" block
cryomick Homework 6 3,532 May-16-2018, 11:12 AM
    Thread: No output in 'english word generator'
Post: RE: No output in 'english word generator'

Just a thought: in the isValid function, I believe "file" is the name of a Python object. Have you tried using a different variable name? It would like naming a variable "int". It tends to confuse the...
cryomick Homework 14 6,505 Jan-10-2018, 09:37 AM
    Thread: run python file on background and start on windows boot
Post: RE: run python file on background and start on win...

A batch file is just a series of commands to be executed in the command line. If you have ever executed your script from the command prompt you already know all you need. Create a text file and write ...
cryomick Homework 7 25,914 Jan-02-2018, 11:52 AM
    Thread: input issue elif
Post: RE: input issue elif

The issue is that the input you receive from the user is a string. So when the console prints "Please Type a Number from 1 to 20" and the user enters (say) 15, the value given to x is '15' rather than...
cryomick General Coding Help 2 3,167 Nov-23-2017, 06:27 AM
    Thread: Using a list like an array
Post: RE: Using a list like an array

Maybe look into the numpy package. It contains functions to process data at C++ like speeds. If I understood your query correctly, this link should be of use.
cryomick Homework 3 3,130 Nov-23-2017, 06:07 AM
    Thread: Script crashes when called from a second script
Post: RE: Script crashes when called from a second scrip...

The actual script isn't called Script A, it's called Ethernet.py. Also I don't think this is an import issue, as I can verify that the functions are called, and that it is the QPixmap line that crashe...
cryomick General Coding Help 2 2,952 Oct-31-2017, 01:27 PM
    Thread: How do you change specific elements in a char array of string?
Post: RE: How do you change specific elements in a char ...

What IDE are you using? I tried this in IDLE and got the following result: >>>a = np.chararray((3,3)) >>> a chararray([['', '\x01', ''], ['\x01', '', ''], ['\x01', '\x...
cryomick Data Science 4 6,530 Oct-31-2017, 08:37 AM
    Thread: Script crashes when called from a second script
Post: Script crashes when called from a second script

I have a report generation script (let's call this script A)that generates a PDF report. I want to import this in a new script (script B) and call the functions from within this new script. The pr...
cryomick General Coding Help 2 2,952 Oct-31-2017, 06:57 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020