Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Detecting windows shutdown event
Post: RE: Detecting windows shutdown event

It looks like you could create a batch file to run your script on Windows shutdown. Excecute code on Windows shutdown
Aurthor_King_of_the_Brittons General Coding Help 4 5,713 Nov-12-2019, 04:51 PM
    Thread: Writing an Adder in python 3?
Post: RE: Writing an Adder in python 3?

I'd start by writing the program out line by line in plain English (pseudocode). Once you've done that, start writing code that corresponds to each line. Google should help with just about every lin...
Aurthor_King_of_the_Brittons General Coding Help 1 2,143 Nov-11-2019, 04:48 PM
    Thread: Potential confusion combining != with or
Post: RE: Potential confusion combining != with or

I would try to split it into two statements/evaluations (one on each side of "or"). I don't have Python open as I'm at work, so my syntax may be off. while answer.lower() != "y" or answer.lower() !...
Aurthor_King_of_the_Brittons General Coding Help 11 4,717 Oct-29-2019, 08:18 PM
    Thread: Trouble with While loops
Post: RE: Trouble with While loops

Create an empty list before the loop to drop the user's input into it during each iteration. Check out this link showing the methods you could use to get what you require. Methods for lists Also, i...
Aurthor_King_of_the_Brittons General Coding Help 1 1,835 Oct-19-2019, 01:22 AM
    Thread: Snake Game - obstacle problem
Post: RE: Snake Game - obstacle problem

Just wanted to give you a heads up: my solution above didn't work out once tested enough times. Not sure if it's on the right track or not, but just didn't want to cause any additional headaches by m...
Aurthor_King_of_the_Brittons Game Development 3 5,629 Oct-19-2019, 12:06 AM
    Thread: Snake Game - obstacle problem
Post: RE: Snake Game - obstacle problem

I found something that appears to work okay from what I could tell. I'm sure there's a more efficient way to do it, but the code is as follows. You may want to include more logic to make sure the bu...
Aurthor_King_of_the_Brittons Game Development 3 5,629 Oct-18-2019, 06:43 PM
    Thread: beginner and need help with python
Post: RE: beginner and need help with python

Here is a decent example of how to increment and decrement in Python, specifically the augmented assignment operators section toward the end the page. Increment and decrement
Aurthor_King_of_the_Brittons Homework 13 5,669 Oct-18-2019, 02:59 PM
    Thread: Calculator won't subtract?
Post: RE: Calculator won't subtract?

I was able to run it by including full evaluations between each "or". Example: if command == "a" or command == "add" or command == "Addition":
Aurthor_King_of_the_Brittons Homework 6 2,902 Oct-17-2019, 04:54 PM
    Thread: Python Programming book
Post: RE: Python Programming book

Check out this thread. It has tons of books, new and old. Python books
Aurthor_King_of_the_Brittons News and Discussions 3 79,039 Oct-16-2019, 04:19 PM
    Thread: Need help in finishing my scripts
Post: RE: Need help in finishing my scripts

The first two lines of code worked okay when I ran it. Inside the parenthesis next to input, you could add a question or statement to make it clearer. Whatever you place there will be shown to the u...
Aurthor_King_of_the_Brittons Homework 5 3,803 Oct-16-2019, 04:02 PM
    Thread: Need to copy column of cell values from one workbook to another with openpyxl
Post: RE: Need to copy column of cell values from one wo...

Copy and paste Excel ranges
Aurthor_King_of_the_Brittons General Coding Help 3 11,216 Oct-12-2019, 10:03 AM
    Thread: Monty Python Quote Most Applicable to Programming
Post: RE: Monty Python Quote Most Applicable to Programm...

-Knights of Ni Quote:"You must cut down the mightiest tree in the forest with...a herring!"
Aurthor_King_of_the_Brittons Bar 4 2,913 Oct-11-2019, 08:52 PM
    Thread: New to Python - What are the basic concepts, uses, and fundamentals?
Post: RE: New to Python - What are the basic concepts, u...

Python Tutorial This may be more detail than you are looking for, but it's a pretty good resource I have used in the past.
Aurthor_King_of_the_Brittons News and Discussions 4 2,025 Oct-10-2019, 02:09 PM
    Thread: what "return" means?
Post: RE: what "return" means?

(Oct-09-2019, 12:50 PM)prih_yah Wrote: All functions return a value when called. Except for void functions, which do not return anything.
Aurthor_King_of_the_Brittons General Coding Help 9 3,911 Oct-09-2019, 01:10 PM
    Thread: White spaces
Post: RE: White spaces

Use "sep" as follows to eliminate all spaces and then add spaces where you want them inside the quotes. n=2005; while (n!=2008) : print("prediction_",n,", ","parameters_",n, " =get_pr...
Aurthor_King_of_the_Brittons General Coding Help 1 1,976 Oct-08-2019, 06:52 PM
    Thread: Trying to color an excel row based on list
Post: RE: Trying to color an excel row based on list

I believe this link could help with that type of formatting. Skip to the first example under conditional formatting (the link is in the table of contacts to skip right to it). It shows how to color ...
Aurthor_King_of_the_Brittons General Coding Help 2 6,565 Oct-08-2019, 04:16 PM
    Thread: random variable function?
Post: RE: random variable function?

The following will randomly select from a predetermined list of your choosing. I'm not sure if that helps. def main(): import random varList = ['ab','bb','cb'] ranVariable = random...
Aurthor_King_of_the_Brittons General Coding Help 4 2,774 Oct-08-2019, 12:57 PM
    Thread: New Programmer / Program
Post: RE: New Programmer / Program

On line 211, it looks like an uneven number of left/right parenthesis. 7 vs 6
Aurthor_King_of_the_Brittons General Coding Help 5 2,815 Oct-07-2019, 08:52 PM
    Thread: New Programmer / Program
Post: RE: New Programmer / Program

Good afternoon, It would help if you posted your code (using the python tag described above) and the full error message you are getting when you run the code.
Aurthor_King_of_the_Brittons General Coding Help 5 2,815 Oct-07-2019, 08:15 PM
    Thread: New Users Introduce Yourself
Post: RE: New Users Introduce Yourself

Good afternoon, I just came across this forum a few days ago and have been hooked since. I started programming in 7th grade (34 now) with QBASIC. For whatever reason, I stopped in high school (life ...
Aurthor_King_of_the_Brittons Bar 431 229,355 Oct-06-2019, 10:29 PM

User Panel Messages

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