Skip to content

sumi6109/book-warmup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

book-warmup

Exercise 1

This exercise is taken from https://github.com/GitbookIO/plugin-exercises

{% exercise %} Define a variable x equal to 10. {% initial %} var x = {% solution %} var x = 10; {% validation %} assert(x == 10); {% endexercise %}

Exercise 2

Write a look to calculate the sum of 1, 2, 3, ...., 10.

{% exercise %} Calculate the sum of 1, 2, 3, ...., 10 {% initial %} var a = 1 var b = 10 var sum = 0 {% solution %} var a = 1 var b = 10 var sum = 0 for(var x=a;x<=b;x++) { sum+=x; } {% validation %} assert(sum == 55) {% endexercise %}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published