Python Programming: Lesson 6 - In-Place Operators and Boolean Expressions

Опубликовано: 15 Август 2021
на канале: youmils03
50
0

PLEASE SUBSCRIBE!!!

In the previous lesson (   • Python Programming: Lesson 5 - Reassi...  ), we studied the reassignment of variables after they were already created, as well as the collection of user input. In this lesson, we briefly review these critical concepts and then continue with in-place operators and boolean expressions.

In-place operators: There is a quicker way of reassigning a variable depending on its current value
x += 16 is a quicker way of writing x = x + 16
y //= 10 is a quicker way of writing y = y // 10
z += " dog" is a quicker way of writing z = z + " dog" for some string z

A boolean expression is one that evaluates to either True or False. For example, print( 5 + 2 == 10 ) would print False on the console. We can also combine boolean expressions. If a = True and b = False, then print( a && b ) would print False but print( a || b ) would print True.

1:25 Review of Reassigning Variables
3:20 Review of User Input
6:09 NEW: In-Place Operators
9:14 NEW: Boolean Expressions
14:21 NEW: Combining Boolean Expressions with and, or, not
18:18 PEEK: Boolean Variables

An equivalent lesson regarding boolean expressions in Java is available here:    • Java Programming: Lesson 8 - Boolean ...  

Ready for boolean variables and the if/else block? Check out lesson 7 here:    • Python Programming: Lesson 7 - Boolea...  

Thanks for watching, and PLEASE SUBSCRIBE!!!


Смотрите видео Python Programming: Lesson 6 - In-Place Operators and Boolean Expressions онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал youmils03 15 Август 2021. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 50 раз и оно понравилось 0 посетителям.