Giter VIP home page Giter VIP logo

17daysofcairo's Introduction

17daysOfCairo

challenge

https://newtonso.notion.site/17-days-of-Cairo-Lang-with-Newton-550dfcda6a2d449ca468be293c776578

Day 1: Hello Playground

https://www.newton.wtf/view/6331946b272f1628ebc42eca

cd src/hello-playground/
source ~/cairo_venv/bin/activate
cairo-compile hello-playground.cairo --output hp_compiled.json 
cairo-run --program=hp_compiled.json --print_output --layout=small

Output

Program output:
  100
  200
  300
  400

Day 2: Functions

https://www.newton.wtf/view/6332ca1f8eae1b839e00d36a

cd src/functions/
source ~/cairo_venv/bin/activate
cairo-compile functions.cairo --output fn_compiled.json 
cairo-run --program=fn_compiled.json --print_output --layout=small

Output

// nothing

Day 3: Conditionals

https://www.newton.wtf/view/633445eb645e6dfa9a39778b

cd src/conditionals/
source ~/cairo_venv/bin/activate
cairo-compile conditionals.cairo --output c_compiled.json 
cairo-run --program=c_compiled.json --print_output --layout=small

Output

// nothing

Day 4 to 6: Rest for me

Best answer:

Day 7: Recursion

https://www.newton.wtf/view/6339c1d5e55ade8283f832e8

cd src/recursion/
source ~/cairo_venv/bin/activate
cairo-compile recursion.cairo --output r_compiled.json 
cairo-run --program=r_compiled.json --print_output --layout=small

Output

  1
  3
  6
  10
  15
  21
  28
  36
  45
  55

Day 8: Field Elements

https://www.newton.wtf/view/633b44a5c3318a62f734710a

cd src/field-elements/
source ~/cairo_venv/bin/activate
cairo-compile field_elements.cairo --output fe_compiled.json 
cairo-run --program=fe_compiled.json --print_output --layout=small

Output

  101
  -99
  81
  100000000000000000000000000000000000000000000000000000000000000000000000
  1000000000000000000000000000000000000000000000000000000000000000000000000000
  -855508365998393641091968349285210316869321645994790099919276168407616061443
  4
  -4
  1206167596222043737899107594365023368541035738443865566657697352045290673498

17daysofcairo's People

Contributors

chococrypto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.