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.
Diese Übung ist Teil des Kurses
Introduction to Julia
Anleitung zur Übung
- Assign the value
4500to the variablemonday_distance. - Assign the value
28.9to the variablemonday_time. - Assign the value
6000to the variablewednesday_distance. - Assign the value
37.1to the variablewednesday_time.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Create variable monday_distance
monday_distance = ____
# Create variable monday_time
____ = 28.9
# Create variable wednesday_distance
____ = ____
# Create variable wednesday_time
____