Challenge: Declaring a Variable
Test yourself and implement what you have learned so far in this challenge.
We'll cover the following
Problem Statement
In this challenge, your task is to declare an immutable variable myFirstVariable
of an integer type and initially assign it the value 100. You then need to print myFirstVariable
.
Input
The input is the variable myFirstVariable
.
Output
The output will be the value assigned to myFirstVariable
.
Sample Input
print(myFirstVariable)
Sample Output
100
Test Yourself
Write your code in the given area.
If
myFirstVariable
is not immutable or if you assign it a value other than 100, the test will fail and underneath the Actual Output column, it will displayIncorrect
.
Try the exercise by yourself first, but if you get stuck, the solution has been provided. Good luck!
//Write Your code here
Let’s go over the solution review in the next lesson.