What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-18 07:25:23
python multiplayer
#some server thingy i found online. server = "" port = 5555 games = {} idCount = 0 currentPlayer = 0 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((server, port)) s.listen() print("Waiting for a connection, Server Star... Add solution -
Other 2022-02-16 08:25:15
which is better for a better code.function or class
class Person(object): def __init__(self, arg1, arg2): self.arg1 = arg1 self.arg2 = arg2 def compute(self, other): """ Example of bad class design, don't care about the result """ retur... Add solution -
Python 2022-02-14 01:10:13
creating an interface tkinter
import tkinter as tk #tkinter is the library that we will use class main: def __init__(self,master): master.title('Simple Interface') #This is the title master.geometry('500x500') #Our window will be a square master.configure(background='wh... Add solution -
Python 2022-02-04 05:15:03
how to multiply 2 decimals together and get answer back in python
import kivy # todo import buttons from kivy and add clear number button on bottum of program and then bind button from kivy.app import App from kivy.uix.label import Label from kivy.uix.gridlayout import GridLayout from kivy.uix.textinput import TextInput... Add solution -
Python 2022-02-03 09:22:09
how to make a text input box python pygame
import pygame as pg pg.init() screen = pg.display.set_mode((640, 480)) COLOR_INACTIVE = pg.Color('lightskyblue3') COLOR_ACTIVE = pg.Color('dodgerblue2') FONT = pg.font.Font(None, 32) class InputBox: def __init__(self, x, y, w, h, text=''): ... Add solution