
// This sample AsciiDoc shows how to use the ifeval conditional directive
// Here we use an attribute :langcode: 1 (having a value 1) and use it to insert an image showing Python or Ruby code

= Programming Fundamentals 
:Author: Prof. Chinmaya S Rathore
:imagesdir: images
:langruby!:       
:rubyskill-starter: 
:langcode: 1


== The IF Statement
An if statement in programming languages is a control flow statement that allows the program to execute different blocks of code based on whether a specified condition evaluates to true or false. 

ifeval::[ {langcode} == 1]  
Here is an example of how the IF statement is written in Ruby:

.If Statement in Ruby
image::images/ifruby.png[]

endif::[]      

// Below We add another ifeval conditional directive to add the image showing the python code if langcode = 2

ifeval::[ {langcode} == 2]  
Here is an example of how the IF statement is written in Python:

.If Statement in Python
image::images/ifpython.png[]

endif::[]  

