Thank you thank you thank you! I have been out of work since March and I have been learning HTML5, XML, Drupal, Joomla and JavaScript (to keep my sanity). I should have done Python first since I am doing SEO and Google uses Python extensively for this and a lot of functions and modules(and code snippets) already exist to take advantage of the capabilities of Python for SEO.
Your little comments keep me interested and your common sense approach keeps me coming back for more.
@TheZestyLemons Yes. However, Python may return an error/warning telling you that the "x" parameter in whatsup(x) isn't used in your whatsup function. If you define your whatsup function with no paramters, then it will get rid of that possible warning/error.
Also, if you want to just make it print it instead of having to put "print whatsup('tony')" you can define it as "def whatsup(x): print 'whats up ' + x" so you can just type in "whatsup('tony')" as a command
every time you press the enter key, I wait for you to say 'bam!' :)
I read your name on another PHP tutorial and some were criticizing you and another vlogger's easy tutorials. well I like your easy tutorials. they save me some money I could spend instead on 'advanced' lessons/books because basically, your easy tutorials were the one taught in most classes anyways. it's always up to the student to self-study and devote time to go further.
thanks man! ive been doing some object oriented programming,(in blender 3d if you have heard of it, if you guys havent you should check it out its for 3d modeling and animation and game creating, i didnt make it and im not advertising just a guy who likes the program)
but anyway this was really helpful. i watched all of your tuts before i started programming but i never really understood the concept of, oh damn i forget what its called.
@jtman56210 Also if you don't know how many arguments you will receive you can put an asterisk (*) before your variable name and that means there will be 0 or more of these. For example:
def printnums(*x): return x
This will return all your numbers you put in. I hope that clears things up for you.
Where do you get "Wham bam" and "roasted toasted". Thanks for letting us know about your itch. You are definitely a programmer ha. Much love, great tutorials, you the man.
@NukaColaQuantumVault I thought there was something wrong with it. Thanks for the advice. Interesting the difference between the available 2.7 and 3.x+ versions.
@NukaColaQuantumVault actually, in python 3x you don't really need to use the print, you just need to call the function, like that: whatsup("Alex") like other functions that we call...then python will return the result.
@TomKMFDM well done for spotting that. it's an easy one to miss. I imagine quite a few people will have this problem. To anyone who hasn't come across this post: you have to press ENTER to CREATE the function.
@Traceurb when you end building your function, instead of "print" just call you function-what ever is called- and it will come up. At least that worked 4 me on python 3.0>
When you call a function, you don't need to say "print". You just call the function. Python will return it automatically. Better yet, you could say "print" instead of "return".
you could instead printing out the result of the function by making it print, u could build it into the function to print, the code would go like this...
"def whatsup(x):
print "whats up " + x
return;"
that will print out the result without having to say print whatsup(x)
RightClick desktop. Select new>shortcut. 2 create a visible shortcut. Now, for location, (which is located in the box you should be seeing at this point) Type this, win shutdown -s -f -t 10 -c"shut down in ten seconds" Click next.You then have the option to name the shortcut and even choose an icon for it!Right click,Properties,programs, change icon.?You can name it whatever you want. after u created your icon, click on it. Your computer will diplay ur msg. then countdown from 10 to shut down
If you want to shutdown your computer type "shutdown" in cmd. Or type "shutdown" in a text file and put a .bat extension on it. Then if you click on the .bat file it will shutdown your computer.
Generally speaking, the print statement in Python2.xx, or print function is py3k, prints something to your screen.
Functions, on the other hand, return a value. If the function returns no value in C, it's called "void" in Python it's called "None".
Functions don't have to display anything to the user. For example: my comment was just passed to a variable. A function returned my comment and wrote it to the screen. No print statement or function was likely used here. You'll get it used to it.
If you're serious about learning Python. Start with Python 2.6, and go buy the book "Core Python Programming." -by Wesley Chun. It is an amazing book with plenty of exercises at the end of each chapter. Take your development very slowly. Use discernment and work each chapter for a week or more, until you can do every exercise in your sleep.
Then move on to the next chapter. Actually "do" every exercise! Even if it sounds boring. Do it. The boring stuff will come in handy later on. Trust me.
Go download some foss source code for a program you are interested in. Then get busy studying the source code. There you have it. No magic bullet, just hands on. Here, atleast so far, you have enough information to follow along in some real world code.
Beside the point. It's not about me not understanding what things can be useful for, it's about how his tutorials lack something that may not be so obvious for other people.
I made my own point. I do that sometimes. Go make your own tutorials and fill the void you feel is missing. Hey, thats cool.. fill and feel in the same sentence.
Do you remember back in math when people would say, "What is this good for?" We know today how valuable math is. We use it all the time (even if it's basic).
Asking what Python is good for is like asking what a hammer is good for. Many things! It takes some creativity and curiosity. No one learns to program with a book or tutorial. You only learn by doing. Then you will clearly see its applications.
This is like the Matrix. We can only show you the door. You have to open it yourself
...You're confusing two concepts here: learning a programming language, and learning a certain aspect of a programming language.
If you're going to present the various aspects of a programming language, I feel you should also give at least one example of what that certain aspect is actually useful for, since it's useless otherwise.
It's a general statement that's not specifically about me not knowing what everything can be useful for, but about how his tutorials can use a lot of improvement by actually providing examples of what certain aspects can be useful for.
In order to understand aspects of English, you actually have to know the language to determine proper application. No one can give you understanding. If you want a simple explanation, it will mislead you. There is no "one size fits all" formula. One functions might withdraw money from ATM. Another function might return balance inquiry. A function is basically some value. It helps the program function. In video games a function might lower health etc. Google "An Introduction to Python: Functions"
And my point is not about this tutorial specifically, but about... all of them, I suppose.
And don't get me wrong, the tutorials are fairly good. They just miss that tiny little thing called "explanation of what it's actually good for" to give it that factor that says "okay, this is one hell of a tutorial that's definitely worth using".
Basically, what I see is "this does this, that does that, go figure out what it's useful for". Of course there are many things that can be accomplished with every aspect, but that doesn't mean we should simply be presented a list of what something does, since that's still fairly useless, really.
"This does this, that does that, go figure out what it's useful for".
Yea, that is pretty much what I'm saying. I understand what you mean. But I had to learn C, C++, Java, and Python before it all started making sense to me.
Once you can think of programming outside the scope of any particular language, something clicks in your head. Google search "How to be a hacker" it's an old essay, but it is very supported. If you have specifics, consult the python forum. Sorry I am not of more help.
For the record, it's not me who doesn't understand what things are useful for. I am an experienced PHP programmer with solid knowledge of C++, so I do have an idea of what certain aspects are useful for. However, I'm just criticizing his tutorials in a constructive manner.
its up to the programmer to decide what to do with it. Like learning Spanish. They teach you what the words mean and how they go together. Not what to talk about.
Comment removed
dontranes1 6 days ago in playlist Bucky's Python
can't we use a variable as an input?
nazookahamed 3 weeks ago in playlist Python Programming Tutorials
>>> def hello(x): print "Hey there " + x
>>> print hello("Dom")
Hey there Dom
None
>>> print hello ('Dom')
Hey there Dom
None
>>>
why is it saying none?
Mageninja22 1 month ago
can i use python with udk and 3ds max?
stari1grad1novi1sad 1 month ago
hey my name is tony you noob
avsummergirl 2 months ago
why didnt you use "print" statement ? in which tutorial you used the "return" statement?
alican447 2 months ago
Hahaaa I was the 50,000th view wot do I get ??????
TeamINSTINKED 2 months ago
@TeamINSTINKED A free " C Dos, C Dos Run" T-Shirt, postage not covered though :/
Blitzbok 2 months ago
lol it said "Python Programming Tutorial - 27 - Building Fun" on the sidebar
TheLandFerry 3 months ago 3
Thank you thank you thank you! I have been out of work since March and I have been learning HTML5, XML, Drupal, Joomla and JavaScript (to keep my sanity). I should have done Python first since I am doing SEO and Google uses Python extensively for this and a lot of functions and modules(and code snippets) already exist to take advantage of the capabilities of Python for SEO.
Your little comments keep me interested and your common sense approach keeps me coming back for more.
uraniumu242 3 months ago
@uraniumu242 Drupal and Joomla sounds like names for shrooms or pot made up by a bunch of stoners
TheLandFerry 3 months ago
dude this was SO simple and straight to the point, just wanted to say thanks like REALLY.
zeroman201 4 months ago
Great Video, Total helped me get over the wall I was facing.
ktabor25 5 months ago
@TheZestyLemons Yes. However, Python may return an error/warning telling you that the "x" parameter in whatsup(x) isn't used in your whatsup function. If you define your whatsup function with no paramters, then it will get rid of that possible warning/error.
ddr4lyfe 6 months ago
Thanks man, I was stuck on this for like half an hour, you cleared it up!
LoneArcane 6 months ago
is it possible to return more than 1 value in python?
example:
return y+10
return x+123
jnghsoccer 6 months ago in playlist Python Programming Tutorials
Also, if you want to just make it print it instead of having to put "print whatsup('tony')" you can define it as "def whatsup(x): print 'whats up ' + x" so you can just type in "whatsup('tony')" as a command
TheSnare1337 8 months ago
how do stop the colours from going when you safe a module file, so annoying
1Moonwalker 9 months ago
@1Moonwalker when u save the file put ".py" after the file name and colors will come back :)
uratoko 8 months ago 12
you can also: whatsup("tony")
PopulardayOfApril 9 months ago
every time you press the enter key, I wait for you to say 'bam!' :)
I read your name on another PHP tutorial and some were criticizing you and another vlogger's easy tutorials. well I like your easy tutorials. they save me some money I could spend instead on 'advanced' lessons/books because basically, your easy tutorials were the one taught in most classes anyways. it's always up to the student to self-study and devote time to go further.
kpopoloopop 10 months ago
Comment removed
kpopoloopop 10 months ago
aww he called me a noob that not nice
loko95ftp 10 months ago
Finally! =D
Zeldakitteh 10 months ago
yay! 0 dislikes!
1994taxman 10 months ago 4
@1994taxman 1 dislike :(
randomguyalwayshere 2 months ago in playlist Python Programming Tutorials
thanks man! ive been doing some object oriented programming,(in blender 3d if you have heard of it, if you guys havent you should check it out its for 3d modeling and animation and game creating, i didnt make it and im not advertising just a guy who likes the program)
but anyway this was really helpful. i watched all of your tuts before i started programming but i never really understood the concept of, oh damn i forget what its called.
but i mean like the x in
def whatsup(x)
anyway thanks
asfadasfa1234 10 months ago
By the time I finish watching all the tutorials, I will end up using 'bucky' as all of my variables that I make in my programs.
MXR789 11 months ago
hahah 0 dislikes thats nice no trolls
toshko3331 11 months ago
@toshko3331 You spoke too soon, I just showed up
GlobusTheGreat 7 months ago
@GlobusTheGreat NOO TROLLZ ARE UPONE US!1!!!!1!!! you jelly non-troll people!?
toshko3331 6 months ago
This has been flagged as spam show
yes i figured it out. in python 3
print whatsup('noob')
would be
print (whatsup (' noob'))
virman123 1 year ago 2
Comment removed
virman123 1 year ago
Comment removed
virman123 1 year ago
what if you wanted to have more than one variable?
jtman56210 1 year ago
@jtman56210 def functionname(x,y,z,w)
erikizitoxxx 1 year ago
@jtman56210 Also if you don't know how many arguments you will receive you can put an asterisk (*) before your variable name and that means there will be 0 or more of these. For example:
def printnums(*x): return x
This will return all your numbers you put in. I hope that clears things up for you.
EliahooProductions 10 months ago
does anyone else hear bass going in the background?
PoltergeistTelephone 1 year ago
"Hold on a second, I got an ITCH..."
lol
themooseatestuff 1 year ago 2
I really benifiting from those tutorials, you are great! thnx a lot
Jaguar48h 1 year ago
I really benifiting from those tutorials, you are great! thnx a lot
Jaguar48h 1 year ago
Where do you get "Wham bam" and "roasted toasted". Thanks for letting us know about your itch. You are definitely a programmer ha. Much love, great tutorials, you the man.
AtomicRobot3 1 year ago
Hey, how do you make a variable a float?
ShiftingStampy 1 year ago
sorry what does ':' this mean again i forgot lolz
jarocho151 1 year ago
this dude is a freakin beast :D
MrNerdswagger 1 year ago
when I type print it's purple. Whats wrong?
jtman56210 1 year ago
@jtman56210 nothing at all. must be the program version or something.
Stauricus 1 year ago
python's like a breath of fresh air compared 2 C++..... i'm lovin it!!
noelsebz90 1 year ago
Comment removed
NasosuBV 1 year ago
a = raw_input("Name: ")
def function1(a): return 'whatsup ' + a
print function1(a)
#this will add the users name into your function
5thElementMods 1 year ago
If you try to use what Bucky did here in Python 3x+, you will get this.
>>> def whatsup(x): return 'Whats up ' + x
>>> print whatsup ('Alex?')
SyntaxError: invalid syntax
To fix this, you need the syntax form as shown below.
>>> print (whatsup('Alex?'))
Then Python will echo.
NukaColaQuantumVault 1 year ago 9
@NukaColaQuantumVault I thought there was something wrong with it. Thanks for the advice. Interesting the difference between the available 2.7 and 3.x+ versions.
rayn1988 1 year ago
@NukaColaQuantumVault actually, in python 3x you don't really need to use the print, you just need to call the function, like that: whatsup("Alex") like other functions that we call...then python will return the result.
igormercurial7 1 month ago
that just blew my mind, after 26 tutorials i thought i would end up punching the screen it was getting so boring but this tutorial just blew me away
kadinz1 1 year ago
python rocks, so simple and logical
zechariahi 1 year ago
Comment removed
zechariahi 1 year ago
I don't get it, what's the difference between print and return?
smikesmike05 1 year ago
if it does not work for you, you made a small mistake:
after `return y+10` you must press ENTER to CREATE the function and after that
you can `print plusten(44)` or just `plusten(44)`
hope this helps someone :D
TomKMFDM 1 year ago
@TomKMFDM well done for spotting that. it's an easy one to miss. I imagine quite a few people will have this problem. To anyone who hasn't come across this post: you have to press ENTER to CREATE the function.
TechSyndrome 9 months ago
this didnt work for me, print highlights in pink and says its an invalid syntax
Traceurb 1 year ago
this didnt work for me
Traceurb 1 year ago
@Traceurb when you end building your function, instead of "print" just call you function-what ever is called- and it will come up. At least that worked 4 me on python 3.0>
Rulowable 1 year ago
you gave great tutorials bucky, you are awesome!!!!
MrPranaykhatri 1 year ago
On 3.0 make sure everything is in the parentheses including the word which isnt defined.( highlightes green in the idle GUI) :)
Tailgater 1 year ago
hey Ok first question is there any way i can like set me a pass word and user name on it and save it where only i can log on to it
ThreeDudes1camera 1 year ago
i like turtles
HASHlRAMA 1 year ago
yes!!! ive made a proper calculator!!! thanks
tomek123kotek 1 year ago 2
Very nice xD good thing to learn c:
Unethural 1 year ago
When you call a function, you don't need to say "print". You just call the function. Python will return it automatically. Better yet, you could say "print" instead of "return".
HHBones 1 year ago
wads the function of return???
moron4890 1 year ago
@moron4890 it returns wat u type + the function
selectguygl 1 year ago
Am I the only one who heard bass kicks in the background of this video?
Party nearby? go to 2:49 and max volume :P
pappegye 1 year ago
Cant you just say:
x = raw_input("....")
wassup = 'wats up ' + x
print wassup
I guess its a quicker alternative but id like to know other pros of this method...maybe im not creative
Stayboomed 1 year ago
Thanks po
ffffgen 1 year ago
the print whatsup("tony") thing isnt working i got python 3.0. can anyone help plz?
elljp1993 1 year ago
Would it be possible to make a Login page in a build fonction?
Example :
def login(huifvshirufhswihsfushfsdfhsudhf):
name = raw_input('Enter Username: ')
password = raw_input('Enter Password: ')
while name != 3 or password != 4:
huifvshirufhswihsfushfsdfhsudhf
Thx.
Darkpirater 1 year ago
Comment removed
MrSaggat 1 year ago
great man
pitbullrozh 1 year ago
Thank you very much.
wamdpst 2 years ago
whatsup('everybody')
ddelude 2 years ago 12
could you use print instead of return
Wheelz2020 2 years ago
dope... makes perfect sense..
sekulr 2 years ago
Comment removed
Aggregate02 2 years ago
whats up noob!
Hight3mp 2 years ago
you could instead printing out the result of the function by making it print, u could build it into the function to print, the code would go like this...
"def whatsup(x):
print "whats up " + x
return;"
that will print out the result without having to say print whatsup(x)
pivotofpower 2 years ago
@pivotofpower u would only have to type whatsup(x)
pivotofpower 2 years ago
RightClick desktop. Select new>shortcut. 2 create a visible shortcut. Now, for location, (which is located in the box you should be seeing at this point) Type this, win shutdown -s -f -t 10 -c"shut down in ten seconds" Click next.You then have the option to name the shortcut and even choose an icon for it!Right click,Properties,programs, change icon.?You can name it whatever you want. after u created your icon, click on it. Your computer will diplay ur msg. then countdown from 10 to shut down
squint28 2 years ago
how do i make it do a more complicated function like turn a computer off?my friend told me to write
C 00 T Shutdown
but idk if that's right
also
how do i get python?
ImAustinH 2 years ago
If you want to shutdown your computer type "shutdown" in cmd. Or type "shutdown" in a text file and put a .bat extension on it. Then if you click on the .bat file it will shutdown your computer.
xXdaveXsuperstarXx 2 years ago
if you watch the first tutorial, he tells u
pimpmobile999 2 years ago
Simple. Import the os module and then type the module and then the method which is:
os.system("SHUTDOWN /s")
Aggregate02 2 years ago
You are awesome.
Cbierbower 2 years ago
NICE>>> and understandable going to tut 28!!! WOOT!!!
DaVietPride 2 years ago
awesome
GerbrandThunder1 2 years ago 2
great tutorials! I'm a fan of urs. so, keep it up, man!
elteachel 2 years ago 91
when are we gonna make a program
kilershark95 2 years ago 3
whever u want...
GNSstudios 2 years ago
Keep up the excellent tutorials.!
geekintheperimeter 2 years ago
what's the difference between print and return?
daisyfoofpoof 2 years ago
Generally speaking, the print statement in Python2.xx, or print function is py3k, prints something to your screen.
Functions, on the other hand, return a value. If the function returns no value in C, it's called "void" in Python it's called "None".
Functions don't have to display anything to the user. For example: my comment was just passed to a variable. A function returned my comment and wrote it to the screen. No print statement or function was likely used here. You'll get it used to it.
anzwertree 2 years ago
If you're serious about learning Python. Start with Python 2.6, and go buy the book "Core Python Programming." -by Wesley Chun. It is an amazing book with plenty of exercises at the end of each chapter. Take your development very slowly. Use discernment and work each chapter for a week or more, until you can do every exercise in your sleep.
Then move on to the next chapter. Actually "do" every exercise! Even if it sounds boring. Do it. The boring stuff will come in handy later on. Trust me.
anzwertree 2 years ago 2
Also can you tell us how Python can be used in a practical sense?
CMDProductionsTM 2 years ago
I agree. You explain how everything works, but you haven't explained what everything is actually useful for.
YaManTino 2 years ago
Go download some foss source code for a program you are interested in. Then get busy studying the source code. There you have it. No magic bullet, just hands on. Here, atleast so far, you have enough information to follow along in some real world code.
darxalot 2 years ago
Beside the point. It's not about me not understanding what things can be useful for, it's about how his tutorials lack something that may not be so obvious for other people.
YaManTino 2 years ago
I made my own point. I do that sometimes. Go make your own tutorials and fill the void you feel is missing. Hey, thats cool.. fill and feel in the same sentence.
darxalot 2 years ago
Besides, if you learning how to program is not useful, then maybe you're wasting your time here.
darxalot 2 years ago
Do you remember back in math when people would say, "What is this good for?" We know today how valuable math is. We use it all the time (even if it's basic).
Asking what Python is good for is like asking what a hammer is good for. Many things! It takes some creativity and curiosity. No one learns to program with a book or tutorial. You only learn by doing. Then you will clearly see its applications.
This is like the Matrix. We can only show you the door. You have to open it yourself
anzwertree 2 years ago
thanks :) I think I get it.....
daisyfoofpoof 2 years ago
...You're confusing two concepts here: learning a programming language, and learning a certain aspect of a programming language.
If you're going to present the various aspects of a programming language, I feel you should also give at least one example of what that certain aspect is actually useful for, since it's useless otherwise.
YaManTino 2 years ago
Perhaps you are right. What do you want to know? Are you asking what functions are useful for? Or is this a general statement?
anzwertree 2 years ago
It's a general statement that's not specifically about me not knowing what everything can be useful for, but about how his tutorials can use a lot of improvement by actually providing examples of what certain aspects can be useful for.
YaManTino 2 years ago
In order to understand aspects of English, you actually have to know the language to determine proper application. No one can give you understanding. If you want a simple explanation, it will mislead you. There is no "one size fits all" formula. One functions might withdraw money from ATM. Another function might return balance inquiry. A function is basically some value. It helps the program function. In video games a function might lower health etc. Google "An Introduction to Python: Functions"
anzwertree 2 years ago
And my point is not about this tutorial specifically, but about... all of them, I suppose.
And don't get me wrong, the tutorials are fairly good. They just miss that tiny little thing called "explanation of what it's actually good for" to give it that factor that says "okay, this is one hell of a tutorial that's definitely worth using".
YaManTino 2 years ago
Please make tutorials for us.. i'd like to see what you have to offer
abedbae 2 years ago 2
Comment removed
YaManTino 2 years ago
Basically, what I see is "this does this, that does that, go figure out what it's useful for". Of course there are many things that can be accomplished with every aspect, but that doesn't mean we should simply be presented a list of what something does, since that's still fairly useless, really.
YaManTino 2 years ago
"This does this, that does that, go figure out what it's useful for".
Yea, that is pretty much what I'm saying. I understand what you mean. But I had to learn C, C++, Java, and Python before it all started making sense to me.
Once you can think of programming outside the scope of any particular language, something clicks in your head. Google search "How to be a hacker" it's an old essay, but it is very supported. If you have specifics, consult the python forum. Sorry I am not of more help.
anzwertree 2 years ago
For the record, it's not me who doesn't understand what things are useful for. I am an experienced PHP programmer with solid knowledge of C++, so I do have an idea of what certain aspects are useful for. However, I'm just criticizing his tutorials in a constructive manner.
Just wanted to get that clear.
YaManTino 2 years ago
ya thats a pretty good essay i've read it
GNSstudios 2 years ago
its up to the programmer to decide what to do with it. Like learning Spanish. They teach you what the words mean and how they go together. Not what to talk about.
sirtwizt 2 years ago 58
In my school they actually do tell you what to talk about...
happyslapper1 2 years ago
@sirtwizt exacto! como programador debemos decidir qué queremos o debemos hacer.. como en mi caso, pasar el curso de lenguajes :)
Sn0wings 6 months ago
@sirtwizt But sample programs do help you learn applications, like having to translate sentences.
ERPP8 4 months ago
nice tutorials! 5/5
btws hav you stopped making the robotics tutorial?
SoulReaper1680 2 years ago
I know, we still haven't built a robot
CMDProductionsTM 2 years ago
2nd comment
travatack 2 years ago
Yay first view and comment. Nice tutorial btw.
vegasguy1237 2 years ago