Python Programming Tutorial – 20 – If Statement

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

27 responses to “Python Programming Tutorial – 20 – If Statement”

  1. Gammingwiththe pro Avatar

    These videos r so usefull

  2. Cuthlehoop Avatar

    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'

  3. JazeJ Avatar

    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?

  4. Saqib Naveed Avatar

    20 videos in a row

  5. joe dunleavy Avatar

    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)))

  6. Vijay G Avatar

    nice vids tho very helpfull thanks bucky

  7. Vijay G Avatar

    he never mentions his name

  8. Vijay G Avatar

    hey bro i didnt catch your name?

  9. Matej Mayer Avatar

    to me it says "invalid syntax" and it marks ":" and i did it like you did and it says that help plz…

  10. Phurba Sherpa Avatar

    thanks for the wonderful video .helped me a lot 

  11. 24Mrjack Avatar

    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'   

  12. Eli Palmer Avatar

    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.

  13. coolapple14 Avatar

    been waiting for this :3

  14. Abhimanyu Aryan Avatar

    C is still better than python if(condtion) vs  if condition :

  15. George hanes Avatar

    tuna = "fish"
    if tuna == 'fish' :
        print 'this is a fish'

    else:
        print 'this is not a fish'

  16. CocoPibbles Avatar

    +HimikoWerckmeister yes you can.

  17. HimikoWerckmeister Avatar

    Got a good question, is it possible to incorporate multiple if statements into a program?

  18. Fahmeeda Begum Avatar

    Hey with what name should I save the program

  19. TheDoughnut Avatar

    i learnt the if statement after the second video

  20. Darksource Avatar

    Thumbs up if this was easy because you tried c++ before.

  21. Darksource Avatar

    Python 3 is buggy, I wouldn't recommend using it.

  22. Sachi Patil Avatar

    This guy is awesome!! 😀

Leave a Reply

Your email address will not be published. Required fields are marked *