Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: kivy: how to create a widget that represents a circled letter?
Post: RE: kivy: how to create a widget that represents a...
solved: **wink**
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.graphics import Color, Ellipse
from kivy.uix.label import Label
from kivy.metrics import dp
from kivy.lang impor... |
|
Coricoco_fr |
GUI |
1 |
1,022 |
Feb-10-2023, 03:45 PM |
|
|
Thread: kivy: how to create a widget that represents a circled letter?
Post: kivy: how to create a widget that represents a cir...
Hello,
[kivy]
how to create a widget that represents a circled letter?
I want to be able to move this widget to my root widget as I please. However, I can't associate the circle with the letter. The a... |
|
Coricoco_fr |
GUI |
1 |
1,022 |
Feb-10-2023, 03:11 PM |
|
|
Thread: re.sub not working
Post: RE: re.sub not working
Hello,
(Oct-02-2022, 04:50 AM)deanhystad Wrote: Some characters have special meanings in regular expressions, such as (). You obviously know this because your used backslashes to remove their spec... |
|
Coricoco_fr |
General Coding Help |
7 |
2,729 |
Oct-02-2022, 05:42 AM |
|
|
Thread: Python 100 line Challenge
Post: RE: Python 100 line Challenge
(Jun-04-2022, 10:25 AM)menator01 Wrote: Here is my go at it using after.
import tkinter as tk
import time
class View:
def __init__(self, parent):
self.parent = parent
self.canv... |
|
Coricoco_fr |
Code sharing |
9 |
3,412 |
Jun-20-2022, 07:18 AM |
|
|
Thread: How to find the second lowest element in the list?
Post: RE: How to find the second lowest element in the l...
Hello,
>>> students = [['Harry', 37.21], ['Berry', 37.21], ['Tina', 37.2], ['Akriti', 41], ['Harsh', 39]]
>>> studList = [student[0] for student in sorted(students, key = lambda x: x... |
|
Coricoco_fr |
General Coding Help |
3 |
2,026 |
May-31-2022, 01:58 PM |
|
|
Thread: Python 100 line Challenge
Post: RE: Python 100 line Challenge
(May-27-2022, 02:19 PM)codingCat Wrote: Here is a first offering. Something I have dubbed a chaos spinner. Credit for the trig needed to rotate the spinners goes to its original author. My contribu... |
|
Coricoco_fr |
Code sharing |
9 |
3,412 |
May-29-2022, 06:06 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-09-2022, 06:33 PM)codingCat Wrote: (May-09-2022, 06:04 PM)menator01 Wrote: If you remove comments and spacing, got it to 31 lines.
hideturtle(), speed('fastest')
penup(), goto(-200, 10*30/2),... |
|
Coricoco_fr |
Code sharing |
34 |
8,433 |
May-11-2022, 05:34 PM |
|
|
Thread: check if element is in a list in a dictionary value
Post: RE: check if element is in a list in a dictionary ...
Hello,
(May-11-2022, 04:18 PM)ambrozote Wrote: something like this?You can use for/else loop:
a = "Doors"
dict = {"a":["Doors","Windows"],"b":"Stairs"}
for val in dict.values():
if a in val:
... |
|
Coricoco_fr |
General Coding Help |
4 |
1,989 |
May-11-2022, 05:21 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-09-2022, 12:17 PM)codingCat Wrote: And here is another offering of my own -- I took the random maze idea from youTube's 8-bit guy and combined it with a random maze idea of my own. I had to do ... |
|
Coricoco_fr |
Code sharing |
34 |
8,433 |
May-09-2022, 01:11 PM |
|
|
Thread: Split a number to list and list sum must be number
Post: RE: Split a number to list and list sum must be nu...
(Apr-27-2022, 12:16 PM)Dexty Wrote: (Apr-27-2022, 05:10 AM)sunny9495 Wrote: How to split a number to list and list sum must be number
Example :
x = 8
i want to split and make a list with 3 items... |
|
Coricoco_fr |
General Coding Help |
5 |
2,306 |
Apr-28-2022, 06:47 AM |
|
|
Thread: How do I remove spurious "." from a string?
Post: RE: How do I remove spurious "." from a string?
Hello,
you can do this:
>>> text = 'I a.m so pl.ea.sed to me.et y.ou. I ho.pe .tha.t th.is is t.he st.a.rt of a lo.n.g fri.en.dsh.ip.'
>>> ". ".join(sentence.replace(".", "") for se... |
|
Coricoco_fr |
General Coding Help |
7 |
2,070 |
Apr-12-2022, 04:20 AM |
|
|
Thread: list, map and put of the Queue in the Tree Data Structure
Post: RE: list, map and put of the Queue in the Tree Dat...
Hello,
This for explain:
class Example():
def __init__(self):
pass
def mymethod(self, name):
return f"Hello {name}"
ex = Example()
out = list(map(ex.mymethod, ['me', 'you']))
p... |
|
Coricoco_fr |
Homework |
6 |
1,669 |
Mar-30-2022, 03:52 AM |
|
|
Thread: Typeerror
Post: RE: Typeerror
Hello,
Please show the Traceback. It contains useful information. |
|
Coricoco_fr |
Homework |
2 |
1,239 |
Mar-28-2022, 06:24 AM |
|
|
Thread: Return a value to __main__
Post: RE: Return a value to __main__
This is a better practice.
import tkinter as tk
class Window(tk.Frame):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.count = 1
self.label =... |
|
Coricoco_fr |
GUI |
7 |
1,808 |
Mar-27-2022, 07:52 AM |
|
|
Thread: Return a value to __main__
Post: RE: Return a value to __main__
Hello,
I'm not sure I understood your request. Do you want to do this? :
import tkinter as tk
class Window(tk.Tk):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
... |
|
Coricoco_fr |
GUI |
7 |
1,808 |
Mar-27-2022, 06:54 AM |
|
|
Thread: name.split() + (And) + print question
Post: RE: name.split() + (And) + print question
for display:
>>> out = ["Bob", "Alice"]
>>> print(f"Hello {' and '.join(out) if out else 'stranger'}")
Hello Bob and Alice
>>> out.pop()
'Alice'
>>> print(f"Hello {... |
|
Coricoco_fr |
Homework |
12 |
3,719 |
Mar-26-2022, 03:28 PM |
|
|
Thread: name.split() + (And) + print question
Post: RE: name.split() + (And) + print question
Quote:Also what is to meaning to have input(">") rather then input()
It's all the same. It's just to display ">". |
|
Coricoco_fr |
Homework |
12 |
3,719 |
Mar-26-2022, 02:43 PM |
|
|
Thread: name.split() + (And) + print question
Post: RE: name.split() + (And) + print question
Hello,
I propose this:
entry = input(">").split()
d = {"A": False, "B": False, "C": False}
for word in entry:
if 'A' == word:
d['A'] = True
if 'B' == word:
d['B'] = True
... |
|
Coricoco_fr |
Homework |
12 |
3,719 |
Mar-26-2022, 02:15 PM |
|
|
Thread: name.split() + (And) + print question
Post: RE: name.split() + (And) + print question
Hello,
@deanhystad: What do you have in mind? Show it.
If for you the difference is the difference between words and name is the capitalization it is not a valid criterion ... |
|
Coricoco_fr |
Homework |
12 |
3,719 |
Mar-26-2022, 05:10 AM |
|
|
Thread: name.split() + (And) + print question
Post: RE: name.split() + (And) + print question
Hello,
name = input()
if 'Alice' in name:
if 'Bob' in name:
print ('Hello Bob & Alice!')
else:
print ('Hello Alice!')
elif 'Bob' in name:
print ('Hello Bob!') |
|
Coricoco_fr |
Homework |
12 |
3,719 |
Mar-25-2022, 03:11 PM |