시작하기무료로 시작하기

Assigning variables

Assigning variables means you can write more complex code. Using variables also makes the code you write more interpretable since you are labeling the pieces of information rather than having them as raw pieces of data.

You are writing a script to calculate your average running pace from your last two runs. You want to assign your run times and distances to variables so you can process them later.

이 연습은 강의의 일부입니다

Introduction to Julia

강의 보기

연습 안내

  • Assign the value 4500 to the variable monday_distance.
  • Assign the value 28.9 to the variable monday_time.
  • Assign the value 6000 to the variable wednesday_distance.
  • Assign the value 37.1 to the variable wednesday_time.

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

# Create variable monday_distance
monday_distance = ____

# Create variable monday_time
____ = 28.9

# Create variable wednesday_distance
____ = ____

# Create variable wednesday_time
____
코드 편집 및 실행