• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

Basic Programming

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.

snacchan

Tree Puncher
#1
Hello all,

I just made a simple program that any new programmers can learn. I used Python as it's very simple to make and to translate into pseudo code.
I'd recommend starting with Python before learning new languages because you can implement multiple languages within IDLE.
Enjoy!

Code:
#simple program to ask the user's name and favourite food
import time

#asks for user's name
userName = input("Hello! What is your name? ")

#waits for 1.5 seconds before executing next command
time.sleep(1.5)

#prints the inputted name
print("Hey", userName+", I'm Python!")

#asks user for it's favourite food
favFood = input("What's your favourite food? ")

#if the user inputs 'Pizza' or 'pizza' as their favourite food, the program will reply with 'I love pizza too!'
if favFood == "Pizza" or "pizza":
    print("I love pizza too!")

#any other input and the program will reply with the inputted food and 'is pretty good too.'
else:
    print(favFood,"is pretty good too.")

#waits for 3 seconds before executing next command
time.sleep(3)

#the program closes itself
exit()
 

thedeibo

Department Head
Staff Member
Department Head
Community Team
#2
Although you posted it in Off-Topic, LEET isn’t really the platform for code tutorials that isn’t PocketMine or madcommand related.
 

snacchan

Tree Puncher
#3
Although you posted it in Off-Topic, LEET isn’t really the platform for code tutorials that isn’t PocketMine or madcommand related.
Not really a tutorial, just is a quick pointer since I've had people ask me too many times what languages to learn first before learning PHP for PocketMine etc. so that's why I made this simple program as a little example.
 

thedeibo

Department Head
Staff Member
Department Head
Community Team
#4
Python is quite different to php. You’d be leading them astray. Plus the PocketMine api puts a whole new twist on php. So tbh, any other programming languages are irrelevant.

Sure they give a basic understanding of code, but it will not help learn another code too easy.
 

snacchan

Tree Puncher
#5
Just learning PHP will only really help you in web development, so encouraging someone to learn more flexible languages will help them expand their knowledge of programming.

Of course I understand your point of view, but I believe that if we just say to new coders in the LEET and PocketMine community, "PHP is the only language you need for most things", they won't be able to create better programs, not just for Minecraft!
 

MrCakeSlayer

Staff Member
Manager
Donator
#6
He isn't saying PHP is what you need for most stuff, it's simply what you need for pocketmine or pmmp plugin development. Sure python will help them learn a code language that's useful in its own way. It won't however really help them learn pmmp plugin development.
 

snacchan

Tree Puncher
#7
He isn't saying PHP is what you need for most stuff, it's simply what you need for pocketmine or pmmp plugin development. Sure python will help them learn a code language that's useful in its own way. It won't however really help them learn pmmp plugin development.
I completely agree. I just was thinking about the future of our generation, that's all :)
 

thedeibo

Department Head
Staff Member
Department Head
Community Team
#8
The world is going to me made up of robots building robots, then those robots maintaining the robots that build robots. And some funky AI learning everything... so what's the point of worrying about the future generation? They're dooooomed without the threat of robots and AI anyway (from experience trying to teach them, they're so nooby it's unbelievable) XD
 

snacchan

Tree Puncher
#9
The world is going to me made up of robots building robots, then those robots maintaining the robots that build robots. And some funky AI learning everything... so what's the point of worrying about the future generation? They're dooooomed without the threat of robots and AI anyway (from experience trying to teach them, they're so nooby it's unbelievable) XD
So basically, we're doomed lol