Waste less time on Facebook — follow Brilliant.
×

Writing Code in Solutions

Hi all. What's the best way to include code in a solution? I've never done this before today. Any help is appreciated!

Note by Ryan Tamburrino
1 year, 7 months ago

No vote yet
1 vote

Comments

Sort by:

Top Newest

1
insert code here
Vincent Miller Moral · 1 year, 7 months ago

Log in to reply

@Vincent Miller Moral Yeah, like that! How do you make that box?

1
2
This is an example       
Edited by Calvin
Ryan Tamburrino · 1 year, 7 months ago

Log in to reply

@Ryan Tamburrino Add ``` to the start and end of your code sequence. I've edited your comment so you can click "edit" to see the change.

For more information, see this. Calvin Lin Staff · 1 year, 7 months ago

Log in to reply

@Calvin Lin Thanks a bunch! Ryan Tamburrino · 1 year, 7 months ago

Log in to reply

If you mean LaTeX, then just begin your code with \(

and end with \)

Example, if you wanted to write the square root of 2, you would do \(\sqrt{2}

and then end it with \).

\(\sqrt{2}\).

When you post, at the bottom, there is a formatting guide, it will tell you all you need to know. Alan Yan · 1 year, 7 months ago

Log in to reply

@Alan Yan Sorry, I meant code as in a programming language, e.g. Python, Java. Should've been more precise. Ryan Tamburrino · 1 year, 7 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...