Python Programming 6. Relational Operators

preview_player
Показать описание
This is the sixth in a course of computer science video lessons introducing programming with Python. It covers the If statement in more detail, in particular, performing tests on numeric values with relational operators. These include: equal to, greater than , greater than or equal to, less than, less than or equal to, and not equal to. The video also shows you how to test if a value falls within a range of values using relational operators alongside the logical operator AND. You will see how to test a temperature that is input by the user and output whether it is freezing, cold, warm or hot. You will also see how to compare two numbers that have been input by the user and output if one is bigger than the other.
Рекомендации по теме
Комментарии
Автор

if temperature <= -50 or temperature >= 50:
print("You're going to die.")

kevnar