Skip to main content
added 126 characters in body
Source Link
Caridorc
  • 27.6k
  • 7
  • 54
  • 135

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.


unutar = [(-250, 100), (-150, 100), (-50, 100), (50, 100), (150, 100), (-250, 0), (-150, 0), (-50, 0), (50, 0), (150, 0), (-250, -100), (-150, -100), (-50, -100), (50, -100), (150, -100), (-250, -200), (-150, -200), (-50, -200), (50, -200), (150, -200)]

This is a long list that maybe could be generated with list comprehension.


You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.

Use the right tool for the right job

Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.


When you have fixed all the more serious issues fix what PEP8 tells you to fix.

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.


unutar = [(-250, 100), (-150, 100), (-50, 100), (50, 100), (150, 100), (-250, 0), (-150, 0), (-50, 0), (50, 0), (150, 0), (-250, -100), (-150, -100), (-50, -100), (50, -100), (150, -100), (-250, -200), (-150, -200), (-50, -200), (50, -200), (150, -200)]

This is a long list that maybe could be generated with list comprehension.


You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.

Use the right tool for the right job

Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.


unutar = [(-250, 100), (-150, 100), (-50, 100), (50, 100), (150, 100), (-250, 0), (-150, 0), (-50, 0), (50, 0), (150, 0), (-250, -100), (-150, -100), (-50, -100), (50, -100), (150, -100), (-250, -200), (-150, -200), (-50, -200), (50, -200), (150, -200)]

This is a long list that maybe could be generated with list comprehension.


You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.

Use the right tool for the right job

Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.


When you have fixed all the more serious issues fix what PEP8 tells you to fix.

added 363 characters in body
Source Link
Caridorc
  • 27.6k
  • 7
  • 54
  • 135

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.


unutar = [(-250, 100), (-150, 100), (-50, 100), (50, 100), (150, 100), (-250, 0), (-150, 0), (-50, 0), (50, 0), (150, 0), (-250, -100), (-150, -100), (-50, -100), (50, -100), (150, -100), (-250, -200), (-150, -200), (-50, -200), (50, -200), (150, -200)]

This is a long list that maybe could be generated with list comprehension.


You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.

Use the right tool for the right job

Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.


You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.

Use the right tool for the right job

Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.


unutar = [(-250, 100), (-150, 100), (-50, 100), (50, 100), (150, 100), (-250, 0), (-150, 0), (-50, 0), (50, 0), (150, 0), (-250, -100), (-150, -100), (-50, -100), (50, -100), (150, -100), (-250, -200), (-150, -200), (-50, -200), (50, -200), (150, -200)]

This is a long list that maybe could be generated with list comprehension.


You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.

Use the right tool for the right job

Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.

added 363 characters in body
Source Link
Caridorc
  • 27.6k
  • 7
  • 54
  • 135

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.


You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.

Use the right tool for the right job

Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.

All I'm asking for is your overall opinion of how it was done and how it works.

Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.


from turtle import *
import time
from random import *
from tkinter import *

Please do not use import *, instead use import long_long_name as short


crtanje2(x, y) and crtanje(br, boja) are 50 lines long. Divide them in smaller functions.


Remove the following because it is never used.

def mj(x, y):
    return x, y

global pon
global m
global klik
global tocnih

Do not use globals, instead pass the variables you need to the function as parametre.


Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.


pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()

Your code uses a great deal of two letters names, longer names are generally preferred.


It is common practice to define a main function that actually does stuff and then do:

if __name__ == "__main__":
    main()

so that you can then import your module.


You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.

Use the right tool for the right job

Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.

added 257 characters in body
Source Link
Caridorc
  • 27.6k
  • 7
  • 54
  • 135
Loading
added 146 characters in body
Source Link
Caridorc
  • 27.6k
  • 7
  • 54
  • 135
Loading
added 73 characters in body
Source Link
Caridorc
  • 27.6k
  • 7
  • 54
  • 135
Loading
Source Link
Caridorc
  • 27.6k
  • 7
  • 54
  • 135
Loading