I have a graphical application using Gtk in Python, the program has font definitions and font sizes. When running the program in linux works correctly, but when running on Raspberry the font is not changed. Does anyone know why this happens?...
I'm following this PDF , I'm on page 10, the code gives error and I I do not know why.
from tkinter import *
class Janela:
def __init__(self,toplevel):
self.fr1 = Frame(toplevel)
self.fr1.pack()
self.botao1 = Butt...
n = int(input("Digite N: "))
lista =[]
divisores =[]
for i in range(2, n+1):
for j in range(1,n+1):
if i>=j:
if i%j ==0:
divisores.append(j)
print("divisores",divisores)
if...
The __subclasscheck__ method must be defined at the metaclass level, since the __subclasshook__ method can be defined as a class method since the class has a ABC metaclass (or one of its derivatives).
My question is when we c...
I'm messing with python and pycuda, studying codes and etc and I came across the following question: What's happening exactly on the second line?
service will receive some attributes, in the first line, and until then everything okay. However in...
I'm trying to delete an item inside a loop.
I already learned that it is not possible.
I'm seeing how to implement a comprehensive list.
But I still do not understand how it works. I tried to do this:
result = [x for x in range(0, len(lis...
I'm drawing the bar graph using the following Python code:
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import matplotlib.dates as dates
from datetime import datetime, timedelta
x = []
y = []
with open("Tem...
Python objects have some magic methods like __init__ , __str__ , __eq__ , __ne__ , __gt__ , __lt__ , __ge__ and __le__ . How to simulate these methods in javascript, when I do console.log(obj)...
x = eval(input())
x = eval(input())
polinomio = 3*x**3- 5*x + 0.8
for x in range (x,x,0.5):
print(polinomio)
Traceback (most recent call last):
File "C: /Users/User/AppData/Local/Programs/Python/Python36-32/fdrew.py", line 4, in
...
Can I use ".find" to make the program search for a word within a typed text and say whether it exists or not (true or false) and in which line of text it is located, if not, which command use to do this?
What I already have:
a = str(input())
#...