Skip to content

[Python Part 3] Data Science | Studi Independen | MyEduSolve X Kampus Merdeka

Notifications You must be signed in to change notification settings

nurulauliyas/Python-Part-3_Conditional-Expressions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Python-Part-3_Conditional-Expression

Conditional Expression

If

  • if is the program evaluates the test expression and will execute statement(s) only if the test expression is True.

  • If the test expression is False, the statement(s) is not executed.

Else

  • Else statement is to evaluate a condition and take one path if it is true but specify an alternative path if it is not.

Elif

  • Use the elif condition is used to include multiple conditional expressions after the if condition or between the if and else conditions.
  • The elif is short for else if. It allows us to check for multiple expressions.
  • If the condition for if is False, it checks the condition of the next elif block and so on.
  • If all the conditions are False, the body of else is executed.

About

[Python Part 3] Data Science | Studi Independen | MyEduSolve X Kampus Merdeka

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published