June 23, 2024, 4:07 p.m. | David Bosah

DEV Community dev.to

If-Else statements and its significance.


"If-else" statements are a type of conditional statements in programming which allows specific logic or conditions to be given to different blocks of code. It's literally creating a bias or condition to a code block. The benefits range from making decisions to controlling possibilities.


Practical example


Lets say we want to write a code about weight information in such a manner that if the user is above 130kg He/She is overweight, see how we are …

beginners benefits bias block code decision decision making decisions example logic making practical programming python significance tutorial type understanding webdev

AI Focused Biochemistry Postdoctoral Fellow

@ Lawrence Berkeley National Lab | Berkeley, CA

Senior Data Engineer

@ Displate | Warsaw

Solutions Architect

@ PwC | Bucharest - 1A Poligrafiei Boulevard

Research Fellow (Social and Cognition Factors, CLIC)

@ Nanyang Technological University | NTU Main Campus, Singapore

Research Aide - Research Aide I - Department of Psychology

@ Cornell University | Ithaca (Main Campus)

Technical Architect - SMB/Desk

@ Salesforce | Ireland - Dublin