anyone know why when i deleted python3.2 to make sure my programs always ran in 2.7, i can no longer open my python files and when it gives me the list to choose from and i click on python or pythonw in the python 2.7 folder it doesnt load or show up on recomended programs or other programs? i can no longer click edit in idle either. please help!!!
Just a note everybody, in Python 3 raw_input isn't recognized as a function and will return as an error. However, input() now works for all the things it didn't work for in Python 2.6. Please thumbs up this comment so everyone else can see it and help raise awareness on this update.
@AstroCamo I'm really thinking about it. I know some of the things they changed were to make it more efficient in the future, but really? Compatibility is horrible. I can't even get Tkinter to work, there goes GUI programming.
Man, I just wanna say thanks! because you have put much time in these tutorials and i guess it was a whole lot of work. I love it how in the beginning you start with loose ends and by the time you go further everything adds up and works together :D and I love your way of explaining, man again thanks! I can't say that enough, I subscribed, but I wish i could subscribe like a 1000 times ;p
When I was programming at DELPHI I could use the ISNUMERIC() function combined with DO UNTIL LOOP.... But using PYTHON I really don't know how to easily create a INPUT and be really sure that this input is really gonna be a number...
I am having issues with INPUT().... I intend my users to give numbers as answers but sometimes they answer to an INPUT() with strings. Is there anyway to repeat the INPUT() until it gets a valid answer?
I'd rather not use IDLE to run my program. Is there any way to stop the command prompt from automatically closing once the program is finished running?
before the return statement at the end of your program, place an input statement, the prompt will wait for a key press and once you are done you can press any key to close.
its barbaric but simple and will be good enough for now.
real GUI programs are basically one big loop and once the 'X' is clicked it make a break statement from the loop. but the input statement will be good enough for when you are just learning or are doing something simple (^_^)
i made a little game using python where theres this person you get to name asks you a bunch of questions and stuff and i noticed how raw input worked better in some cases
In Python 3, raw_input() is now called input(), and the old version 2 input() function is unavailable. If you want the old input() function, use eval(input()) instead.
A function called wordList that is called with the name of a .GLOSS file. The utility loads this file into memory as a list of strings. It then searches through the file string by string. Whenever it finds a string beginning “<CONCEPT>”, it displays all text between the <CONCEPT> and <\CONCEPT> tags. In this way, we obtain a display of the terms being defined in this particular glossary.
@101abob I have used py2exe, you can find it by Googling. Only downside is that even a small program will use several megs of disk space, as all the libraries must be included.
I wrote a program (as my thesis in computational linguistics) that analyzes babylonian finite verbs. The source code, lexicon and grammar files were around 250kb in total, but the compiled program is around 5 megs.
Well, not a big problem unless you look for elegancy.
reminds of BASIC when I was a young 11 year old in the 70's, I learned BASIC.
BASIC had a command line like that which is separate from the line numbers. You could run commands in the interpreter like that. Python reminds me a lot of that. The good ol' BASIC.
Here is a brain teaser. Since raw_input() will accept integers and strings. If you are using raw_input how do you know if the user typed integers? Since they have been converted with no error checking. :)
thanks bucky :) your videos are the only ones that i truly really understood :) your 'no bull' way of teaching is one of a kind. i hope you can also do some django tutorials someday. looking forward to the other stuff that you will be producing in the future...
one question: bucky, you say input is for numbers and raw _input is for alphbets right? so if u say x = raw_input("write something u idiot") and tht idiot writes a number , will it say error? now what about this one: x = input("write something: ") print x + ("is something") what will happen if he writes an alphabet? error? what will happen if he writes a number? error?
lol thanks, I was having a calculator code and i was wondering what is wrong with it because it was working fine untill I decided to put a welcome message for the user and it was like
UserName = input('Hello stranger, what is your name?')
A function called wordList that is called with the name of a .GLOSS file. The utility loads this file into memory as a list of strings. It then searches through the file string by string. Whenever it finds a string beginning “<CONCEPT>”, it displays all text between the <CONCEPT> and <\CONCEPT> tags. In this way, we obtain a display of the terms being defined in this particular glossary.
input is a function that not only outputs a string value, but it also retrieves a number input as well, where as print is only meant to output strings.
I'm bouncing between Ruby and Python. Thanks for these tutorials, they're ordered like Python's documentation, but more entertaining (hypertext is boring :P).
hmmm... ruby ive never heard of that. i think you shoukd use python because its more well known and is a realy good scripting/programming programme for beginners.
A function called wordList that is called with the name of a .GLOSS file. The utility loads this file into memory as a list of strings. It then searches through the file string by string. Whenever it finds a string beginning “<CONCEPT>”, it displays all text between the <CONCEPT> and <\CONCEPT> tags. In this way, we obtain a display of the terms being defined in this particular glossary.
I want this video on my Doraemon phone.
rafaelsalinas58 1 month ago
I bet your name is Greg. It says where the file is stored "C:\Users\Greg\Buckey.py
LOL @ YOUR LIES!!!!
t94j00 1 month ago 2
anyone know why when i deleted python3.2 to make sure my programs always ran in 2.7, i can no longer open my python files and when it gives me the list to choose from and i click on python or pythonw in the python 2.7 folder it doesnt load or show up on recomended programs or other programs? i can no longer click edit in idle either. please help!!!
Jacksonisking1 1 month ago
@Jacksonisking1 did you press f5 to open it?
X0wnageX1 1 month ago
This has been flagged as spam show
This video is a favorite on Belgrade
jesusgray922 1 month ago
IDLE crashes whenever I open a new window. (I am on mac)
cboulos97 2 months ago
@cboulos97 yea, i dont know why it does that but i did it to me so i switched to one of my family members PC..
Geordan271 2 months ago in playlist Python Programming Tutorials
@Geordan271 Re-download it, but click the 32-bit I think.
cboulos97 2 months ago
@cboulos97 Get a PC.
fidolimp 1 month ago
raw_input(..) became input(..)
input(..) became eval(input(..)) but try not to use this one because it can run code (big security risk)
Use int(input(..)) for numbers
Culinax 2 months ago
Can you use the raw_input function for intergers?
twinsofliberty 2 months ago in playlist Python Programming Tutorials
can you make a libary to store a bunch of passwords in it and use it for a log in?
The419Clan 2 months ago
wow i put toby=raw_input("enter name: ")
print toby*10 and it wrote toby out 10 times insane
rednut416 3 months ago
x = raw_input("type your name here: ")
if x= "ukki747": print"welcome " +x
else: print"go away"
I want to have this program print:"welcome ukki747 when I input my name
and otherwise print:"go away.
but it gives me an error on the second line, can somebody help me?
ukki747 3 months ago
@ukki747 are you for real??
Nijokaz 3 months ago
@Nijokaz yeah, but I figured it out, thx
ukki747 3 months ago
This has been flagged as spam show
@ukki747 You need a space after the x so its like this:
x = raw_input("type your name here: ")
if x = "ukki747": print"welcome " +x
else: print"go away"
rccarvids294 3 months ago in playlist More videos from thenewboston
Whats the difference between input and sys.argv function? they both require user input ?
bjebn 3 months ago
Thanks Sir Bucky
farazhashmi9000 4 months ago in playlist More videos from thenewboston
is your real name greg cuz i was looking at the top of the screen and it said something about greg
thbeserk 4 months ago
6 and 7 are the same video
disnukka79 5 months ago
@disnukka79 the 6th vi is the introduction of the strings and the 7th one is more about the strings, they aren't the same :D
Lazaruzerick 5 months ago
5 people mistaked the "dislike" for "THIS I LIKE"
xoDevilBabyox 5 months ago
@xoDevilBabyox that's so old. attention seeker.
JT10831 5 months ago in playlist Python Programming Tutorials
Just wondering. What is the point of using input when its just numbers when you can just do raw_input which can do numbers and strings?
daredevilpwn 6 months ago
@daredevilpwn If the program treats it as a string and not a number, it can't calculate with it.
Because "I am just a computer so I don't understand" "Letters and numbers, that is not math, not english that's not nothing".!!! :P
VselwynV 5 months ago
@VselwynV Alright thank you for the clarification
daredevilpwn 5 months ago
is it okay if we just replace raw_input with input? Is there anything you can do with input that you cannot do with raw_input?
curryeater259 6 months ago
Can you convert an INT into a STR. I need my inputs to be numbers so that I can do sums with them but I cant then print them out with a string.
dnryuuzaki54 6 months ago
@dnryuuzaki54
yes you can. For example
a=5
b= str(a) #converts the value of a into a string
c= int(b) # converts the string of b into an integer
a + c
>>> 10 # the sum of a and c is 10
doanhqdo 5 months ago
And raw_input() is input()
EAGangstad 6 months ago
Those of you with Python 3-- Print is a function. . . print("Print is a function!!")
EAGangstad 6 months ago
i was under the impression that with the new programs, you can still run raw_input it just does the exact same thing as input
IrishCowboy87 6 months ago
hey bucky u r0ckzzzzzzzzzz.. liked ur every tutorials very much.. very inf0rmative.. u r teaching very well.. :)
murtaza3113 6 months ago
BAM!!! :D
ecvsio 6 months ago
In python 3.2 it would be
buck = input("Enter name: ")
print (buck)
iReVoDesigns 7 months ago
thats cool. What i was doing was
str(input(Enter name: ))
penguin4four 7 months ago
Thanks so much for this video series, its so helpful
ModdingNation1 8 months ago 2
5 people thought python was just a snake.
EvilGenius447 8 months ago 11
Great videos and very helpfull for me i just started to roll the ball.... thank you..
note: function raw_input() in not wrking in python version 3.2
mcaprasad3 10 months ago
note: function raw_input() in not wrking in python version 3.2
mcaprasad3 10 months ago
raw_input() in 2.6 is input() in 3.x
input() in 2.6 can be done by eval(input()) in 3.x
THUMBS UP TO KEEP IT ALIVE!!
crashowerride 11 months ago 23
its great, in 8 videos he has turned what was to me an insolvable program into something i can use. thankyou
Richificationism 11 months ago
thanks
hntommylam 1 year ago
Cool man. I do love the tutorials. Damn the courses I had in the univ
MrFlyingLeaf 1 year ago
Ahh got it now, had commented on that earlier.
Andys12169 1 year ago
difference between input and raw_input:
watch?v=OQGCaXT-Ljw
CSryoh 1 year ago
Thanks so much for your tutorials. I made my first module ( a chat module) from your other tutorials. Thanks so much!
anizzle54 1 year ago
buck=rocky rock rocky hes awesome
basicxml 1 year ago
just now start your tutorial i like it let me go through all than ill get back to u
85rajnish 1 year ago
Just a note everybody, in Python 3 raw_input isn't recognized as a function and will return as an error. However, input() now works for all the things it didn't work for in Python 2.6. Please thumbs up this comment so everyone else can see it and help raise awareness on this update.
9KindsOfCrazy 1 year ago 364
@9KindsOfCrazy Switch to Python 2.7
AstroCamo 1 year ago
@AstroCamo I'm really thinking about it. I know some of the things they changed were to make it more efficient in the future, but really? Compatibility is horrible. I can't even get Tkinter to work, there goes GUI programming.
9KindsOfCrazy 1 year ago
@AstroCamo Good advice
TubeFreakification 1 year ago
@9KindsOfCrazy wrong: raw_input is indeed recognized when the code is run, I can prove it... At least in 3.2
Btw, for all to see: you can also type int(raw_input('text goes here')) if you want an integer input, as raw input ALWAYS make it a string
phroggyy 6 months ago
@9KindsOfCrazy Thanks for this!!! Very helpful.
Colstonewall 5 months ago
Man, I just wanna say thanks! because you have put much time in these tutorials and i guess it was a whole lot of work. I love it how in the beginning you start with loose ends and by the time you go further everything adds up and works together :D and I love your way of explaining, man again thanks! I can't say that enough, I subscribed, but I wish i could subscribe like a 1000 times ;p
MilitiaGFX 1 year ago
i love it when he says "bam!". I'll say that everytime I run a programme, it adds a thrill to it.....
trr12 1 year ago
This doesn't apply for python 3 does it?
jillybooty 1 year ago
No matter what video I watch, YouTube wants me to date Chinase women.
BTW cool tutorials, thanks a lot!
braunmarci 1 year ago
When I was programming at DELPHI I could use the ISNUMERIC() function combined with DO UNTIL LOOP.... But using PYTHON I really don't know how to easily create a INPUT and be really sure that this input is really gonna be a number...
andregiestas 1 year ago
I could solve it using GAMBI PATTERN DESING (LOL, TRY ... EXCEPT....)
It is not the best way but it is the only I know from other languages...
andregiestas 1 year ago
This has been flagged as spam show
I am having issues with INPUT().... I intend my users to give numbers as answers but sometimes they answer to an INPUT() with strings. Is there anyway to repeat the INPUT() until it gets a valid answer?
regards,
andregiestas@gmail.com
andregiestas 1 year ago
This has been flagged as spam show
I'm coding now!!! with less then a day experience in programming.
MrMicsau 1 year ago
I'm coding now!!! with less then a day experience in programming.
MrMicsau 1 year ago
dude u didnt tell us aoubt raw input
tttlycoolxtreme7dude 1 year ago
Subtitles and this video rocks. I re-watched it with them on and got 100x better results.
rohit91 1 year ago
I'd rather not use IDLE to run my program. Is there any way to stop the command prompt from automatically closing once the program is finished running?
123IOWNALL321 1 year ago
@123IOWNALL321 Tutorial 5 - How to Save Your Program. Watch the end of it.
jdwolfears 1 year ago
@123IOWNALL321
before the return statement at the end of your program, place an input statement, the prompt will wait for a key press and once you are done you can press any key to close.
its barbaric but simple and will be good enough for now.
real GUI programs are basically one big loop and once the 'X' is clicked it make a break statement from the loop. but the input statement will be good enough for when you are just learning or are doing something simple (^_^)
itachisxeyes 1 year ago
@itachisxeyes
Thanks...but I figured it out like a month ago lol. It's still useful to this day though :)
123IOWNALL321 1 year ago
@123IOWNALL321 yeah...after i posed, i looked up and saw someone had already answered your question. (<_<)
itachisxeyes 1 year ago
BOOOOO
SogeKami 1 year ago 10
@SogeKami
Gurararararararara
1337Kakashi 1 year ago 8
@1337Kakashi
Foshfoshfoshfosh
SogeKami 1 year ago 8
@SogeKami
KAKAKAKAKAKAKAKA
1337Kakashi 1 year ago 10
@1337Kakashi
DONchakapataklon
SogeKami 1 year ago 10
@SogeKami
BON BON BON BONBON
1337Kakashi 1 year ago 10
@1337Kakashi
Bonbon tree
SogeKami 1 year ago 10
@SogeKami
banzai tree
1337Kakashi 1 year ago 10
@1337Kakashi
Raw input (hubbababba)
SogeKami 1 year ago 49
This has been flagged as spam show
@1337Kakashi
Foshfoshfoshfosh don
SogeKami 1 year ago
bwehhhhh
1337Kakashi 1 year ago 8
i made a little game using python where theres this person you get to name asks you a bunch of questions and stuff and i noticed how raw input worked better in some cases
iopabc123789 1 year ago
done and done. subscribed!thanks bucky
hoangchi100 1 year ago
If your following in Python 3.x should you just skip this video since there is only input()
B.T.W. ^^ that ^^ is an question which I would like to be answererd
bboybram 1 year ago
Now they are both input, because of the newer version. At least I think that's how it is.
masterassassin1 1 year ago
@masterassassin1 Correct
NorwayHack 1 year ago
yay i fixed my addition program
tomek123kotek 1 year ago
Thanks po
ffffgen 1 year ago
In Python 3, raw_input() is now called input(), and the old version 2 input() function is unavailable. If you want the old input() function, use eval(input()) instead.
I.e., if your old version 2 Python program said:
n = raw_input("Enter your name: ")
x = input("Enter expression: ")
then your new version 3 Python program would say:
n = input("Enter your name: ")
x = eval(input("Enter expression: ")
ncdave4life 1 year ago 2
This has been flagged as spam show
CAN YOU PLEASE DO THIS FOR ME !!!!!!!!! THANK YOU
A function called wordList that is called with the name of a .GLOSS file. The utility loads this file into memory as a list of strings. It then searches through the file string by string. Whenever it finds a string beginning “<CONCEPT>”, it displays all text between the <CONCEPT> and <\CONCEPT> tags. In this way, we obtain a display of the terms being defined in this particular glossary.
ankurvasudeva 1 year ago
This has been flagged as spam show
THE COLLAPSE OF THE THEORY OF EVOLUTION IN 20 QUESTIONS
newaninvitationtothetruth.blogspot ( DOT ) com/
((( Acquainted With Islam )))
aslam-ahmd.blogspot ( DOT ) com/
acquaintedwithislam.maktoobblog ( DOT ) com/
ahmd1431 1 year ago
input() supercedes raw_input() for python 3.
lompocus 1 year ago
how can i make my .py files into a .exe
101abob 1 year ago
@101abob I have used py2exe, you can find it by Googling. Only downside is that even a small program will use several megs of disk space, as all the libraries must be included.
I wrote a program (as my thesis in computational linguistics) that analyzes babylonian finite verbs. The source code, lexicon and grammar files were around 250kb in total, but the compiled program is around 5 megs.
Well, not a big problem unless you look for elegancy.
Usumgallu 1 year ago
reminds of BASIC when I was a young 11 year old in the 70's, I learned BASIC.
BASIC had a command line like that which is separate from the line numbers. You could run commands in the interpreter like that. Python reminds me a lot of that. The good ol' BASIC.
SubUrbanHunter 1 year ago
THAAAAAAAAAAAAAAAAAANK U BRO FOR THIS Gr8 Tutorials <33
ejram3 1 year ago
"Você é o cara", thanks so much!
leoz1992 1 year ago
i dont really get the difference between input and raw_input...
it's the only thing i didnt understand so far...or one of the few...
coladomestre 1 year ago
so again no raw_input in python 3 or wat??? again its showing me errors
picknpac 1 year ago
@picknpac
input() in python 3 = raw_input() in previous versions.
scorpion990 1 year ago
Btw, is ur name Greg? :p
Awesome.
ChewalierAnsatsusha 1 year ago
hey, you do great tutorials if you keep doing great tutorials i will sub,rate 5 and comment like what i'm going to do with this one
ILIKETOCRY9 1 year ago
a=1
b=raw_input("enter max")
while a<=b: print a*a, a=a+1
why this didn't work ????
the answer is there is a difference between 'raw_input()' & 'input()'
thank you man, u shaved my hrs
GriffinnoFamily 1 year ago
in python 3.xx just use input() it works
SuperiorPancake 1 year ago
wouldnt you have to use
int(input("Enter max "))?
SkimpyDoughnut 1 year ago
well it worked for me but maybe that works to.
SuperiorPancake 1 year ago
Here is a brain teaser. Since raw_input() will accept integers and strings. If you are using raw_input how do you know if the user typed integers? Since they have been converted with no error checking. :)
superpredator78 1 year ago
This has been flagged as spam show
Thank you very much.
wamdpst 2 years ago
keep up the good work!! Very helpful for noobs like me!
minime78 2 years ago
@ss11311086
Wow, that was clever! How long did it take you to come up with that one??
Did you mommy have to help you?
Lyerae 2 years ago
This comment has received too many negative votes show
welcome everyone, I'm fucky!
ss11311086 2 years ago
thanks bucky :) your videos are the only ones that i truly really understood :) your 'no bull' way of teaching is one of a kind. i hope you can also do some django tutorials someday. looking forward to the other stuff that you will be producing in the future...
MsTweety76 2 years ago 3
was this function changed or removed in python 3?
theMastrgamr 2 years ago
ty for the vids :)
amora101 2 years ago
Comment removed
ConTroLLFlubber 2 years ago
Comment removed
ConTroLLFlubber 2 years ago
Comment removed
ConTroLLFlubber 2 years ago
I think he had Version 25.something
Kraized 2 years ago
what version do you have?
bowendude1234 2 years ago
input() returns an integer... so if he writes a number. hes good. if he writes letters it fails.
raw_input returns a string... so if he writes a number. hes good. if he writes letters hes good. because those are string..
idk if bucky said but numbers can be string.
'16' is a string
'buck' is a string
'this is a string' is a string
18 is an integer.
'bucky' is not an integer
lfroggyl 2 years ago
You are wrong. input() assumes that whatever is returned is a valid function. raw_input does not.
That is why if you type...
input()
and a user types...
my name is jon
It will give you an error saying "my name is jon" is not a valid function. Whereas if you did the same thing with RAW_input, it would not.
Raw_input basically converts the information into a string.
IPlayInBeastMode 2 years ago 4
rubikscube10 2 years ago
rubikscube10
if you write a numer in raw_input...that number become STR, and you cant operate it with other numbers,
izrafel1989 2 years ago
tanx a lot
foad62 2 years ago
input() treats whatever the user enters as python code.
If they put their response in parenthesis it'll return a string. If the user enters 1+ 2**2 it'll return 5.
1000101er 2 years ago
lol thanks, I was having a calculator code and i was wondering what is wrong with it because it was working fine untill I decided to put a welcome message for the user and it was like
UserName = input('Hello stranger, what is your name?')
print 'Well, hello now ' UserName
r3sp3c791 2 years ago
Try this instead:
x = raw_input("Hello stranger, what is your name? ")
print "Well, hello now, " + x
That should work fine. Chances are you've already figured it out, though.
SiGhast 2 years ago
...Blah, dude. Nevermind.
I hadn't watched the video and I didn't read your full comment as I wrote that.
Now I know what you mean.
*facepalm*
Sorry.
SiGhast 2 years ago
This comment has received too many negative votes show
I dont see why python is so popular, its like autoit.
HordeAreMyFatCousins 2 years ago
Wow, I just crashed the Python program xD
Edmontonia 2 years ago
What is the difference between using the
input ("Hello") and the
print ("Hello")
papano12 2 years ago
If you used print, it would only display hello.
If you used input("Hello") then it would display Hello and ask for the user to type something in.
MuppitFood 2 years ago 10
This has been flagged as spam show
CAN YOU PLEASE DO THIS FOR ME !!!!!!!!! THANK YOU
A function called wordList that is called with the name of a .GLOSS file. The utility loads this file into memory as a list of strings. It then searches through the file string by string. Whenever it finds a string beginning “<CONCEPT>”, it displays all text between the <CONCEPT> and <\CONCEPT> tags. In this way, we obtain a display of the terms being defined in this particular glossary.
ankurvasudeva 1 year ago
input is a function that not only outputs a string value, but it also retrieves a number input as well, where as print is only meant to output strings.
salehenShovonRahman 2 years ago
input is requesting info from the user. output is printing what was input.
sugatmassey 2 years ago
thanks man i want to make a game ive been watching the tutorials up to here ill check the rest later peace
MakeItRayNee 2 years ago
I'm bouncing between Ruby and Python. Thanks for these tutorials, they're ordered like Python's documentation, but more entertaining (hypertext is boring :P).
arinlares 2 years ago
hmmm... ruby ive never heard of that. i think you shoukd use python because its more well known and is a realy good scripting/programming programme for beginners.
Scottk95 2 years ago
Does anyone know of a webpage that has a list of all the functions possible along with a short description?
Like raw_input, input and so on and so on
thanks
fergus247 2 years ago
raw_input isnt a command <,<
CrazyMonkey124 2 years ago
consider me subscribed, bucky
thanks for all the tutorials. impossible to find good ones on the net.
AwesomeTown21 2 years ago 67
CAN YOU PLEASE DO THIS FOR ME !!!!!!!!! THANK YOU
A function called wordList that is called with the name of a .GLOSS file. The utility loads this file into memory as a list of strings. It then searches through the file string by string. Whenever it finds a string beginning “<CONCEPT>”, it displays all text between the <CONCEPT> and <\CONCEPT> tags. In this way, we obtain a display of the terms being defined in this particular glossary.
ankurvasudeva 1 year ago
i dont get it where do i type the raw_input ??
i nevre got told that on the 7th video
ashtonka 2 years ago
If you have python 3 or above, raw_input was removed.
wimawa 2 years ago
thank you.. I am going to use this to make a encryptor/decryptor with this : )... and btw I never noticed u played wow : ) wats ur server/char
; o
huntardrape 2 years ago
thanks man
zamliman 2 years ago
Its best to use raw_input, unless you have a good reason to use regular input. Otherwise, you are trusting the user not to insert python commands.
ogglesnorg 2 years ago 3
My underscorers arent showing up
any help?
letmekilluplz 2 years ago
lernin sum pehthon -D
matt56037 2 years ago