1. Lära sig
  2. /
  3. Courses
  4. /
  5. 금융을 위한 R 중급

Connected

exercise

If this, Else that

if 문을 확장하면 조건이 거짓일 때 다른 동작을 수행하도록 만들 수 있어요. 이는 if 문 뒤에 else를 추가하여 구현합니다:

if(condition) {
    code if true
} else {
    code if false 
}

Instruktioner

100 XP
  • 이전 연습 문제를 확장해서, else 문을 추가하고 "Do nothing!"을(를) 출력하세요.