This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
from math import * | |
root, WIDTH, HEIGHT = Tk(), 872, 630 | |
root.geometry(f"{WIDTH}x{HEIGHT}");root.title("Ved The Pro Calculator") | |
calculationStringFrame = Frame(root);calculationStringFrame.place(x = 0, y = 0, width = WIDTH, height = 100) | |
calculationOutput = Label(calculationStringFrame, bg = "black", fg = "yellow", text = "", font = ("", 50));calculationOutput.pack(fill = X) | |
calcButtons = Frame(root);calcButtons.place(x = 0, y = 100) | |
buttonLayout = [["+", "-", "*", "/"], ["1", "2", "3", "4"], ["5", "6", "7", "8"], ["9", "0", "=", "b"], ["c", "factorial", "**", ","], ["(", ")", "lcm", "gcd"]] | |
buttonFuncLayoutString = "" | |
for i in buttonLayout: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame as pg | |
import time, random | |
pg.init() | |
white = [255, 255, 255];black = [0, 0, 0];red = [255, 0, 0];green = [0, 155, 0];blue = [0, 0, 255];grey = [0, 255, 255] #Colors follow the RGB pattern | |
displayWidth, displayHeight = 800, 600 #Change this to change the dimensions of the screen | |
gameDisplay = pg.display.set_mode((displayWidth, displayHeight)) | |
pg.display.set_caption("Slither") #Change the "Slither" to your wish |