[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Python Programming Tutorial – 20 – If Statement
by
Tags:
Comments
27 responses to “Python Programming Tutorial – 20 – If Statement”
-
These videos r so usefull
-
Not very nice
-
When I type Print it doesn't function. I've typed:
tuna="fish"
if tuna=="fish":
print 'this is a fish alright'
then an error appears "Missing parentheses in call to 'print' -
I have a dictionary and I'm using and input ex. num=int(input("enter num")) to print out a certain phrase using if statements. I need to find another method besides if statements to get the same result because my teacher wants a "cleaner" look. How would i go about this?
-
20 videos in a row
-
Hi I was wondering if someone can please tell me what im doing wrong here. It doesnt quite work:
#asking for state and counties and giving totals with tax for the different counties
userState = input('Please enter state: ').upper()
if userState != 'IL':
userTotalOthr = float(input('What's the total: '))
print('Your total is: ', userTotalOthr)if userState == 'IL':
userCounty = input('What IL county: ').upper()elif userCounty == 'COOK':
print(userCounty + 'COUNTY', userState)
userTotal = float(input('What is the total: '))
print('Your total is: $', (userTotal+(userTotal*.10)))elif userCounty == 'MCHENRY' or userCounty == 'DUPAGE' or
userCounty == 'LAKE':
userTotal2 = float(input('What is the total: '))
print('Your total is: $', (userTotal2+(userTotal2*.05)))else:
userTotal3 = float(input('Whats the total: '))
print('your total is: $', (userTotal3+(userTotal3*.01))) -
nice vids tho very helpfull thanks bucky
-
he never mentions his name
-
hey bro i didnt catch your name?
-
to me it says "invalid syntax" and it marks ":" and i did it like you did and it says that help plz…
-
life saver
-
thanks for the wonderful video .helped me a lot
-
my first game, try it.
p=input('guess a number 1-10: ')
if p == 4:
print 'correct, you win'
else:
print '3 tries remaining'
p=input('guess a number 1-10: ')
if p == 4:
print 'correct, you win'
else:
print '2 tries remaining'
p=input('guess a number 1-10: ')
if p == 4:
print 'correct, you win'
else:
print '1 tries remaining'
p=input('guess a number 1-10: ')
if p == 4:
print 'correct, you win'
else:
print 'you lose' -
No matter what I put after print (a string in single or double quotes, or just a numerical value) it won't run and says that there is invalid syntax.
-
been waiting for this :3
-
C is still better than python if(condtion) vs if condition :
-
tuna = "fish"
if tuna == 'fish' :
print 'this is a fish'else:
print 'this is not a fish' -
+HimikoWerckmeister yes you can.
-
good things
-
yes
-
Got a good question, is it possible to incorporate multiple if statements into a program?
-
Best Teacha evvah
-
Hey with what name should I save the program
-
i learnt the if statement after the second video
-
Thumbs up if this was easy because you tried c++ before.
-
Python 3 is buggy, I wouldn't recommend using it.
-
This guy is awesome!! 😀
Leave a Reply