Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Setting For Loop Counter
Post: Setting For Loop Counter
I am trying to set the counter to the one less if the input does not match with list. However, it seems that it does not set the counter. Any idea please?
team=["Arsenal","Liverpool","New Castle","To... |
|
rturus |
General Coding Help |
2 |
787 |
Dec-07-2022, 12:21 PM |
|
|
Thread: Messagebox
Post: Messagebox
Why can't I see the messagebox when input is not a, b, or c? I am sure there is a good reason but I guess I can't find out yet.
Thanks.
from tkinter import*
from tkinter import messagebox
def math... |
|
rturus |
General Coding Help |
8 |
1,421 |
Nov-08-2022, 03:33 PM |
|
|
Thread: Using Keyboard Arrow Keys
Post: RE: Using Keyboard Arrow Keys
I can move the box with arrow keys but the rest of the code (the one sent) doesn't work. |
|
rturus |
Game Development |
4 |
4,859 |
May-27-2021, 01:00 PM |
|
|
Thread: Using Keyboard Arrow Keys
Post: Using Keyboard Arrow Keys
How can I user keyboard arrows keys to move the catcher (box in the game) to the right and left?
Thanks.
# Bomb Catcher Game
import sys, random, time, pygame
from pygame.locals import *
def print... |
|
rturus |
Game Development |
4 |
4,859 |
May-25-2021, 11:07 AM |
|
|
Thread: List calculation
Post: List calculation
I just want to see if I can do the following code in a different and less repetitive way.
Thansk.
if Ranking_Maths[0]==Teams[0]:
Team1point=Team1point+Maths[0]
elif Ranking_Maths[0]==Teams[1]:
... |
|
rturus |
General Coding Help |
2 |
2,536 |
Mar-30-2021, 12:04 PM |
|
|
Thread: List calculations
Post: List calculations
Sorry for populating the forum. However, I need some advice.
My below data is stored in the lists.
I would like to do calculations on the base of the order. For example: T1=Maths[0]+English[1]+Histor... |
|
rturus |
General Coding Help |
1 |
1,805 |
Mar-23-2021, 03:49 PM |
|
|
Thread: For loops index
Post: RE: For loops index
(Mar-23-2021, 03:27 PM)deanhystad Wrote: for x in range(4) does not use x, it generates x. This is what allows doing this:
for _ in range(4):the recommended way to loop when the loop index is not u... |
|
rturus |
General Coding Help |
5 |
2,508 |
Mar-23-2021, 03:28 PM |
|
|
Thread: For loops index
Post: For loops index
event = ["A","B","C","D"]
for x in range(4):
maximum=(int(input("Enter the maximum points for the " + event[x] + " event ")))
if maximum<5 or maximum>50:
x=x-1
... |
|
rturus |
General Coding Help |
5 |
2,508 |
Mar-23-2021, 08:48 AM |
|
|
Thread: Space between list and column alignment
Post: RE: Space between list and column alignment
(Mar-15-2021, 08:21 PM)snippsat Wrote: List is a data structure(internal use) and not meant to view like this,as that make no sense🦄
For view take elements out data structure,then can figure a diffe... |
|
rturus |
General Coding Help |
8 |
5,109 |
Mar-17-2021, 04:47 PM |
|
|
Thread: Space between list and column alignment
Post: RE: Space between list and column alignment
(Mar-15-2021, 01:48 PM)rturus Wrote: (Mar-09-2021, 01:53 PM)snippsat Wrote: Show example of input and wanted output.
list_a=[1,2,3,4,5]
list_b=['d','h','f','s','g']
print(list_a)
print(list_b)... |
|
rturus |
General Coding Help |
8 |
5,109 |
Mar-15-2021, 01:50 PM |
|
|
Thread: Space between list and column alignment
Post: RE: Space between list and column alignment
(Mar-09-2021, 01:53 PM)snippsat Wrote: Show example of input and wanted output.
list_a=[1,2,3,4,5]
list_b=['d','h','f','s','g']
print(list_a)
print(list_b)This is the output:
[1, 2, 3, 4, 5]
['d... |
|
rturus |
General Coding Help |
8 |
5,109 |
Mar-15-2021, 01:48 PM |
|
|
Thread: Space between list and column alignment
Post: RE: Space between list and column alignment
(Mar-09-2021, 11:28 AM)snippsat Wrote: Look back at your older Thread🧐
However, my previous inquiry was for multi dimensional list.
This is time is separate list I am trying to figure out. |
|
rturus |
General Coding Help |
8 |
5,109 |
Mar-09-2021, 01:10 PM |
|
|
Thread: Space between list and column alignment
Post: Space between list and column alignment
Can anyone tell me how I can put more than one list in table style display please? With columns and rows are nicely aligned.
Thanks. |
|
rturus |
General Coding Help |
8 |
5,109 |
Mar-09-2021, 11:13 AM |
|
|
Thread: GUI calculation mistake
Post: RE: GUI calculation mistake
Thank you. They are really helpful points. |
|
rturus |
GUI |
5 |
2,839 |
Mar-03-2021, 11:39 AM |
|
|
Thread: GUI calculation mistake
Post: GUI calculation mistake
Hi all,
Can anyone tell me why my calculation (total_hscore (at the end of the code) is coming to zero please?
Thanks,
def openHistory():
global total_hscore
newWindow=Toplevel(mgui)
... |
|
rturus |
GUI |
5 |
2,839 |
Mar-01-2021, 04:15 PM |
|
|
Thread: Location of the objects that are moving
Post: Location of the objects that are moving
I have the following code. I would like to add scoring point whenever two rectangles collided with each other.
I am finding difficult to get the location of the rectangles while they are moving.
Any... |
|
rturus |
Game Development |
1 |
2,162 |
Feb-01-2021, 12:05 PM |
|
|
Thread: Formatting lists
Post: RE: Formatting lists
(Nov-24-2020, 11:38 PM)bowlofred Wrote: Use a formatting package. As an example, you could look at tabulate, but there are several others.
Otherwise, you need to calculate the size of your fields ... |
|
rturus |
General Coding Help |
5 |
2,825 |
Nov-26-2020, 01:18 PM |
|
|
Thread: Formatting lists
Post: Formatting lists
How can i format lists in columns so that gap between them are even any they are nicely in line?
Thanks. |
|
rturus |
General Coding Help |
5 |
2,825 |
Nov-24-2020, 10:57 PM |
|
|
Thread: csv file output
Post: RE: csv file output
import pickle
import csv
with open('file.csv','a',newline="") as f:
thewriter=csv.writer(f)
thewriter.writerow([' name',' adult','child','reference'])
ref=-1
av_seats=152
while Tr... |
|
rturus |
General Coding Help |
7 |
3,246 |
Jan-30-2020, 02:00 PM |
|
|
Thread: csv file output
Post: RE: csv file output
Somehow I am getting errors for creating header only once. **huh**
The error is [Errno 13] Permission denied |
|
rturus |
General Coding Help |
7 |
3,246 |
Jan-30-2020, 12:23 PM |