forked from YearOfProgramming/2017Challenges
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
144 changed files
with
2,753 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
challenge_0/coffeescript/kedarbramhe/coffeescripts/hello_world.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log "hello world" |
16 changes: 16 additions & 0 deletions
16
challenge_0/coffeescript/kedarbramhe/coffeescripts/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
##Install | ||
To install, first make sure you have a working copy of the latest stable version of Node.js. You can then install CoffeeScript globally with npm: | ||
|
||
`npm install -g coffee-script` | ||
|
||
##Usage | ||
To compile this file command used is | ||
|
||
`coffee -o javascripts/ -c coffeescripts/` | ||
|
||
Option -c means to compile and -o means the output folder.The ordering should always be output then compile. | ||
|
||
To run the compiled file simply run the compiled .js file with node | ||
for example | ||
|
||
`node hello_world.js` |
5 changes: 5 additions & 0 deletions
5
challenge_0/coffeescript/kedarbramhe/javascripts/hello_world.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Hello | ||
|
||
To compile run `csc.exe hello.cs` and run the resulting file `hello.exe`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using System; | ||
|
||
public class Hello { | ||
static void Main() { | ||
Console.WriteLine("Hello, world!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Hello world! | ||
#### To run the code : | ||
* Install [golgang](https://golang.org/doc/install) | ||
* Open this directory in terminal and run `go run helloworld.go` to compile and run the code. | ||
``` | ||
$ go run helloworld.go | ||
Hello World! | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
func main() { | ||
fmt.Println("Hello World!") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package main | ||
|
||
import ( | ||
"log" | ||
) | ||
|
||
func main() { | ||
log.Println("hello world") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#Hello World | ||
|
||
##Premise | ||
|
||
- Hello and welcome to our little community! We're glad to have you! | ||
- Your first task is to implement a simple Hello World program in the language of your choice. Happy coding! | ||
|
||
##Implementation | ||
|
||
- Call `julia helloworld.jl' in the `src' directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
println("Hello World!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#Hello World | ||
|
||
##Premise | ||
|
||
- Hello and welcome to our little community! We're glad to have you! | ||
- Your first task is to implement a simple Hello World program in the language of your choice. Happy coding! | ||
|
||
##Implementation | ||
|
||
- Call `python main.py' from the `src' directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
def main(): | ||
print 'Hello World!' | ||
|
||
if __name__=='__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Challenge 0 | ||
FILES: | ||
1 . hello.py | ||
Prints hello world to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print('Hello World!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A program written in python which prints "Hello World" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
print("Hello World") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Challenge_0 | ||
|
||
- Print Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# Print Hello World | ||
# | ||
|
||
|
||
def print_hello_world(): | ||
print("Hello World") | ||
|
||
|
||
if __name__ == '__main__': | ||
print_hello_world() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[package] | ||
|
||
name = "hello_world" | ||
version = "0.0.1" | ||
authors = [ "naren <makernaren@gmail.com>" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Hello world! | ||
#### To run the code : | ||
* Install [rustlang](https://www.rust-lang.org/en-US/install.html) | ||
* Open this directory in terminal and run `cargo run` to compile and run the code. | ||
``` | ||
$ cargo run | ||
Hello, world! | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
println!("Hello, world!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# Reverse a String | ||
Application which reverses a string. | ||
|
||
## Building | ||
``` bash | ||
make | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Reverse a string | ||
Application for string reversal. | ||
|
||
## Compile and Run | ||
$gcc string_reverse.c -o 'output.exe' && ./'outputfile' | ||
|
||
## Explanation | ||
Takes string as in-code input and reverses it using two pointers, printing reversed string on console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
#include <string.h> | ||
|
||
void string_reverse(char* string){ | ||
char* start = string; | ||
char* end = start + strlen(string) - 1; | ||
char tmp; | ||
|
||
while (end > start){ | ||
tmp = *start; | ||
*start = *end; | ||
*end = tmp; | ||
|
||
++start; | ||
--end; | ||
} | ||
} | ||
|
||
int main(void){ | ||
char string[] = "Hello!"; | ||
string_reverse(string); | ||
printf("%s\n", string); | ||
return 0; | ||
} |
16 changes: 16 additions & 0 deletions
16
challenge_1/coffeescript/kedarbramhe/coffeescripts/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
##Install | ||
To install, first make sure you have a working copy of the latest stable version of Node.js. You can then install CoffeeScript globally with npm: | ||
|
||
`npm install -g coffee-script` | ||
|
||
##Usage | ||
To compile this file command used is | ||
|
||
`coffee -o javascripts/ -c coffeescripts/` | ||
|
||
Option -c means to compile and -o means the output folder.The ordering should always be output then compile. | ||
|
||
To run the compiled file simply run the compiled .js file with node | ||
for example | ||
|
||
`node hello_world.js` |
5 changes: 5 additions & 0 deletions
5
challenge_1/coffeescript/kedarbramhe/coffeescripts/reverse.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
reverse = (s) -> | ||
if s.length < 2 then s else reverse(s[1..-1]) + s[0] | ||
|
||
s = "HelloWorld" | ||
console.log "s=#{s}, s.reverse=#{reverse(s)}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <iostream> | ||
#include <string> | ||
|
||
int main() { | ||
std::string input; | ||
std::cout << "Enter a string to be reversed:" << std::endl; | ||
std::getline(std::cin,input); | ||
|
||
int length = input.length(); | ||
|
||
for(int i = 1; i <= length; i++) { | ||
std::cout << input[length-i]; | ||
} | ||
std::cout << std::endl; | ||
|
||
return 0; | ||
} |
Oops, something went wrong.