Python 2.7 Tutorial Pt 4

preview_player
Показать описание
In this part of the Python 2.7 Tutorial I explain Conditionals, the If statement, the Conditional Expression and how to turn your Python code into an executable.
Рекомендации по теме
Комментарии
Автор

Good way to show conditionals. Makes it real easy to understand. Great start got me firing up the python and trying all these differant ways. I know we are just getting started but show us some of the complicated stuff somewhere down the road. Great job again.

gent
Автор

@Colstonewall raw_input considers all input to be of type string. String input with input requires the user type strings between quotes. This has been changed in python 3

derekbanas
Автор

@zbeauvais I record screencasts with Quicktime Player and edit the video with iMovie. It's all free software that came with my computer. I don't think there is a good free or inexpensive version for PCs?

derekbanas
Автор

@BLUEC0RE You're welcome. Glad to help :)

derekbanas
Автор

@gent2910 It is going to get complicated real soon. I'll get into system programming, file sharing, chat and real complicated feed and website scraping stuff very soon :)

derekbanas
Автор

when i started with following your tutorials, i found that python was extrem!! Very useful with its functions and syntax and everything..But its very bad that it doesn't have SWITCH!! Such a beautiful language which doesnt have that epic syntax

ThecCc
Автор

chmod only changes access privileges on your computer. It doesn't have any effect on other peoples computers. I might not be understanding the question sorry

derekbanas
Автор

May I ask what you use to capture the screencast? It seems to be pretty smooth and I can read the text well... which is ridiculously useful!

ZachBeauvais
Автор

One quick question Derek: Why use raw_input & convert it to an int??? Why not just use input if it has to be an integer??? Is there an advantage to using int(raw_input) that I'm not seeing??? Thanks D.

Colstonewall
Автор

Check this out for a switch replacement stackoverflow.

derekbanas
Автор

Thank you very much! Your video is incredible!! Do you have notes for all Python 2.7 videos?

chaudao
Автор

Hi I am new to Python, should I be using Sublime text, Pycharm IDE (pro or free edition), Anaconda (Jupyter notebook) What is pros and cons of each?

GurmeetSingh-fruo
Автор

Cool job. Just a small mistake in the code at the end. If for example x, y = 1, 1 the message will be 'x is less than y' which is obviosly not true.

shakaalify
Автор

@derekbanas Thank you. I keep looking for apps for that, forgetting that there are plenty of good ones already there :)

ZachBeauvais
Автор

I'm unable to convert my python code to an executable. it says "Traceback (most recent call last):
  File "<pyshell#38>", line 1, in <module>
    ls
NameError: name 'ls' is not defined". Please help

truecricketfan
Автор

It seems like it has been hacked already. It is pretty much a spam repository at this point :)

derekbanas
Автор

input() can give you int why are you using int(raw_input())

nikhil