Sinisterly
Code with a language you don't know - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: Code with a language you don't know (/Thread-Code-with-a-language-you-don-t-know)

Pages: 1 2 3


Code with a language you don't know - Vi-Sion - 07-15-2018

In order to make more activity in the coding sections and let people learn new languages i've decided to start this game here.
As the title say it you have to code in a language you don't know, exercises must be simple .
When you answer an exercise you'll have the right to choose the second exercise (but keep in mind it must be basic).
Since i have the right to pose the first exercise , it should be the HelloWorld exercise, Write code that prints out "Hello, World!"


RE: Code with a language you don't know - reGEN - 07-16-2018

Is this like Code Golf?

Hello world in Go:

Code:
package main import "fmt" func main(){    fmt.Println("Hello, World!"); }

Next exercise is to code a recursive factorial function!  Tongue


RE: Code with a language you don't know - Percent - 07-16-2018

Might as well start learning Python. It seems like a very simple language, and with my previous experience, I'll probably pick it up rather fairly quickly.

Code:
print("Hello, world!");



RE: Code with a language you don't know - Vultra - 07-16-2018

(07-16-2018, 06:57 AM)Percent Wrote: Might as well start learning Python. It seems like a very simple language, and with my previous experience, I'll probably pick it up rather fairly quickly.

Code:
print("Hello, world!");

you new to python?

for the lols: <h1>Hello world</h1>


RE: Code with a language you don't know - Vi-Sion - 07-16-2018

(07-16-2018, 06:57 AM)Percent Wrote: Might as well start learning Python. It seems like a very simple language, and with my previous experience, I'll probably pick it up rather fairly quickly.

Code:
print("Hello, world!");

@reGEN have already done the helloworld exercise, you now have to solve his exercise .
Code a recursive factorial function!


(07-16-2018, 05:47 AM)reGEN Wrote: Is this like Code Golf?

I have no idea what code golf is .


RE: Code with a language you don't know - reGEN - 07-16-2018

(07-16-2018, 07:01 AM)Vi-Sion Wrote: I have no idea what code golf is .

This: https://codegolf.stackexchange.com/


RE: Code with a language you don't know - Vi-Sion - 07-16-2018

Doesn't look that much like it since here in this game you need to code in a language you don't know.


RE: Code with a language you don't know - Percent - 07-16-2018

(07-16-2018, 07:01 AM)Vi-Sion Wrote:
(07-16-2018, 06:57 AM)Percent Wrote: Might as well start learning Python. It seems like a very simple language, and with my previous experience, I'll probably pick it up rather fairly quickly.

Code:
print("Hello, world!");

@reGEN have already done the helloworld exercise, you now have to solve his exercise .
Code a recursive factorial function!

Sorry, I misunderstood. Here it is (in Java):

Code:
public static long factorial(long i) { // Base case if i == 1; algorithm otherwise return i == 1 ? 1 : i * (factorial(i - 1)); }



RE: Code with a language you don't know - Vi-Sion - 07-16-2018

(07-16-2018, 07:14 AM)Percent Wrote:
Code:
public static long factorial(long i) { // Base case if i == 1; algorithm otherwise return i == 1 ? 1 : n * (factorial(n-1)); }

If @reGEN approve your solution,it's up to you to post a new simple exercise.


RE: Code with a language you don't know - reGEN - 07-16-2018

(07-16-2018, 07:16 AM)Vi-Sion Wrote:
(07-16-2018, 07:14 AM)Percent Wrote:
Code:
public static long factorial(long i) {        // Base case if i == 1; algorithm otherwise        return i == 1 ? 1 : n * (factorial(n-1)); }

If @reGEN  approve your solution,it's up to you to post a new simple exercise.

Thought we had to do it in a language we didn't know.