#Starter Input

1 messages · Page 1 of 1 (latest)

sour plover
#

Hey you pros^^

Feel free to leave me some important things, you maybe wanted to have known earlyer in your PY dev carreer.

Also im looking RN if there is a common way to build up your projects/packages/libs in python.

in Java is looks like in the pic i shared in comments.
Every help apreciated 😉

#

I ask because i want to buildup my first project properly in PY :3

zealous wagon
#

We typically don't have these deep folder structures with 50 nested folders like the Java and C# people

sour plover
zealous wagon
#

Some people have a src folder, some people don't

#

General rule of thumb: Put everything in one file until it feels more comfortable to split it up into different files

sour plover
#

well thats how i like it most xD
Sorted over different modules with one main file running or so 😮

zealous wagon
#

Python is about making it work not about making more directories than your app has users lmao

sour plover
#

thcx^^

#

another question...

#

How does PY indicate, that its the end of if or else or loops?

And how can i integrate a if in a loop? i dotn get it working 😄

zealous wagon
#
for i in range(10):
    if i % 2 == 0:
        print(i)

    print("gang", i)
sour plover
#

hmm weird.
Do i need to have smth behind the if?

zealous wagon
#

No?

sour plover
#

i meant in same line

zealous wagon
#

It's just based on indentation

sour plover
#

gimme a sec:

zealous wagon
#

The : is used for starting a new block

sour plover
#
for i in range(100):
  rndm = random.range(0,100)
  if rndm > 95 :
    print(rndm)

print("end of loop")

kinda not working like i want to xD

#

nvm....

#

just messed up the < instead of > -.....

cosmic shuttle
#

Maybe look into watching a basic tutorial lol

sour plover
#

Well... i got it to run, it was just a logic error on my side xD

#

Another question, which framework for PY GUI is easy to learn and easy to use?

Im unsure which to use and which si easy to follow. Checked on Kivy, but anyhow got nervous when seeing the first example for a pong game 😂

zealous wagon
#

GUI on the desktop is annoying

#

If you're looking to make games probably pygame

sour plover
#

Nah just some standard forms for databse out/input