User Tools

Site Tools


bioinfo:comarative_programming_linguistics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
bioinfo:comarative_programming_linguistics [2022/03/27 08:47] – created hyjeongbioinfo:comarative_programming_linguistics [2022/03/27 09:07] (current) – [If문] hyjeong
Line 3: Line 3:
 ===== If문 ===== ===== If문 =====
 **Perl** **Perl**
 +  if ($name eq 'Haeyoung') { 
 +      print "Hello Haeyoung! Good morning!\n"; 
 +  } else { 
 +      print "You are not Haeyoung. Who are you?\n"; 
 +  } 
 +   
 +  if ($char eq 'A') { 
 +      print "You entered 'A'.\n"; 
 +  } elsif ($char eq 'B') { 
 +      print "You entered 'B'.\n"; 
 +  } else { 
 +      print "I don't understand.\n"; 
 +  }
 **R** **R**
  
Line 9: Line 21:
  
 **Python** **Python**
 +  if money == 20000:
 +      print("KTX 타고 가자")
 +  elif money >= 1000:
 +      print("버스 타고 갈까?")
 +  else:
 +      print("그냥 걸어 가!")
  
 ===== While문 ===== ===== While문 =====
bioinfo/comarative_programming_linguistics.1648338446.txt.gz · Last modified: by hyjeong