Lesson 5 - Python Programming (Automate the Boring Stuff with Python)

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

print("Thank you so much Al Sweigart! Can you teach us more?")
answer=input()
if answer == yes
print("<3")
else:
print("</3")

undermaker
Автор

After watching some videos on python and taking a class, your course is the most well-organized and practical. And it's free! Thank you so much for taking the time to put this course together and make these easy to understand videos!

jasminkhangura
Автор

As someone already said, your course is very well organized. You deserve to get paid, so I bought your book and your cards.
I follow the lecture on line and make annotations on the book I bought. I find this very useful to master the topic.

Thank you again.

cgarza
Автор

Hi Al.

Just got your book and really loving it so far. Thanks for taking the time to make these videos as well; they are the perfect recap.

meanstoandend
Автор

Blank Editor > MyProfessors
True

sedricnicoleurbano
Автор

Thank you for taking your time. Till now I had no idea how to code but I really wanted to get into it so I watched a couple of your videos and this is my first creating (which im proud of) :

print ('Choose password.')
password = input()
print ('Do you choose to save the password ' + password)
Anwser = input()

if Anwser == 'yes':
print ('Okay, welcome sir.')

else:
print ('Choose new password.')
newPassword = input()
print ('Do you choose to save the password ' + newPassword)
newAnwser = input()
if newAnwser == 'yes':
print ('Welcome.')



print ('Enter password here.')
Person = input()

if Person == password or newAnwser:
print ('Access granted.')

else:
print ('Wrong password, try again.')

dominik-zuif
Автор

I like the game you wrote! I haven't coded much in Python but I coded a decent amount in 6 months in JavaScript. I understood most of your code. The only thing I didn't quite get was a part which the syntax read "time.sleep(2)" If I had to guess .sleep is a method and time is an object? I don't know? I am thinking along the lines in how JavaScript works with methods within a function. Later, I will figure it out. Python is actually easier than JavaScript! Which is a very, very good thing! I want to learn Python for automation, there is so many things you can do with Python!

DevlogBill
Автор

Great class .I m all new in programming.But I dared to take this just becoz of you.Hoping to do well in python.Thanks a lot for such a wonderful class.You are a great Lots of love from INDIA

theorganiccook
Автор

I tried it this way in sublime text 4 with Python 3.9.6 and it worked nicely, install the sublimeREPL package first. I didn't know you had to specify whether the input had to be string or integer when working with inputs. I got errors but then it started working when I typed age = int(input())

print('please type your name')
name = input()
print('please type your age')
age = int(input())

if name == 'Alice':
print('Hi Alice')
elif age < 12:
print('You are not Alice, kiddo.')
elif age > 2000:
print('Unlike you, Alice is not a vampire')
elif age > 100:
print('You are not Alice, grannie.')

Thanks for the tutorials!

MayJoe
Автор

My ver is 3.7. After having tested, I realized that:
- 'space' or 'tab' were considered as values of a var -> 'if name:' would output True value even if I inputted 'space' or 'tab'.
- 'space' or 'tab' would be falsey in bool()

bandatoila
Автор

"Falsey", "Truthy" - Now I remember how I felt when the math teacher introduced us to "imaginary" numbers. Thanks for providing this awsome Python Course.

joeleenkado
Автор

Saw a comment where someone didn't understand what the name != ' ' meant, so just in case someone else has that problem,
name is a string, and if it does not equal ' ' (a blank string), then that means it has text inside of it.
Its just makes it easier to read the code.

chilfghfh
Автор

Thank you soooo much for these videos. You helped me understand coding quickly and easily and I was about to quit my class, but now I understand it and actually like it. lol

noni-ayannaroach
Автор

Look, What I made.

print('Please Create a password.')
name = input()
if name != '':
print('Thank you very much.')
else:
print('You did not enter a password')

fromdayea
Автор

Hey Blank Edito thanks for the assistance I was pretty stuck on this section in the book! Btw, you should totally share your game code you referenced in this video I would love to see how it runs!

tyjani
Автор

Best Teacher="Al"

if Best Teacher=="Al":
print ("You are correct, kiddo.")

MisterBiter
Автор

#NBA Player Comparison. My 1st Ever Program

print('Welcome to NBA Player Comparison.')
print('We compare you to a player based on your best skill.')
print('Choose one: score, pass, dribble, dunk, shoot, block')

password = input()

if password == 'score':
print('Since you can score really well, you play most like Kobe Bryant.')
if password == 'pass':
print('Since you can pass really well, you play you most like Steve Nash.')
if password == 'dribble':
print('Since you can dribble really well, you play most like Kyrie Irving.')
if password == 'dunk':
print('Since you can dunk really well, you play most like Shaq.')
if password == 'shoot':
print('Since you can shoot really well, you play most like Steph Curry.')
if password == 'block':
print('Since you can block really well, you play most like Ben Wallace.')

nickfitzpatrick
Автор

I really enjoy your classes. Great videos!

evaf
Автор

Oh gosh it took me a while to wrap my head around how the != condition worked in this example, but I got there in he end.

monhuntui
Автор

I was chasing a dancing Al Sweigart through the depths of a dark Dantesque forest... when I fell through an unseen rabbithole… down, down I fell into the underworld of the code...

languagegame