Skip to content
Sign UpLog In
Profile icon

codewithmenow

@codewithmenow
Repls
Community
codewithmenow
codewithmenow
shared a Post
3 years ago
2048 game
import random from tkinter import Frame, Label, CENTER SIZE = 400 GRID_LEN = 4 GRID_PADDING = 10 BACKGROUNDCOLORGAME = "#92877d" BACKGROUNDCOLORCELL
TintedShallowProfessionals
Python
codewithmenow
codewithmenow
shared a Post
3 years ago
import turtle length = 100 size = 400 colors = ['red', 'orange', 'yellow', 'green', 'blue', 'violet'] turtle.speed(0) turtle.pensize(50) for i in
OptimisticOrneryInversion
Python
codewithmenow
codewithmenow
shared a Post
3 years ago
import pygame import random """ 10 x 20 square grid shapes: S, Z, I, O, J, L, T represented in order by 0 - 6 """ pygame.font.init() GLOBALS VARS s
TautRegularVoxels
Python
codewithmenow
codewithmenow
shared a Post
3 years ago
import pygame import random """ 10 x 20 square grid shapes: S, Z, I, O, J, L, T represented in order by 0 - 6 """ pygame.font.init() GLOBALS VARS s
SturdySaltyArrays
Python
Coder100
Coder100
image Hello, why are you escaping these? That will throw a syntax error because for the first line (\') there is no string so that becomes an operator, but there is no \ operator so it throws an error. At the end of the string, \' will make the string continue on and put in a literal ' instead of ending the string. Perhaps you mean: ['.....', '.0...', '.000.', '.....', '.....'], Make sure to do that with all you arrays.3 years ago
PattanAhmed
PattanAhmed
@codewithmenow Hi, You have mistakenly used Escape Characters I mean you used \', which is an escape character. It is used to escape apostrophe in the line. Hence, you have used it without knowing then, you should probably want to change your codes like this... Instead of this \'.....\' You should add a apostrophe after the last one... It should be like this:- \'.....\'' DONE! But you should do for every line that ends with pink \' to \'' at last. Thanks! Hope this helps3 years ago
SixBeeps
SixBeeps
When you use a backslash (\), you're telling the compiler to escape the next character, i.e. don't do anything special with the next character. I'm guessing that you wanted a backslash at the end of your string, so you'll actually have to escape the backslash itself. So, something like: S = [[\'.....\\', \'.....\\', # etc. `3 years ago
codewithmenow
codewithmenow
shared a Post
3 years ago
import turtle import os wn = turtle.Screen() wn.title("Pong") wn.bgcolor("black") wn.setup(width=800, height=600) wn.tracer(0) Score score_a = 0 sco
RoyalDryGraphics
Python
userSM
userSM
I'm bad a pong but like this game :)3 years ago