[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

You roll you create.

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 269
Thread images: 15

File: 1468269825441.jpg (314KB, 1261x1000px) Image search: [Google]
1468269825441.jpg
314KB, 1261x1000px
You roll you create.
>>
>>55626814

(you)
>>
>>55627061
import random

if random.randint(0, 1):
print 'heads'
else:
print 'tails'
>>
>>55626814
Roller
>>
awfuckit
>>
Rodando
>>
Sounds fun. I'm gonna make it tomorrow though.
>>
>>55627177
What does that mean? Someone explain or I'll go with this roll.
>>
File: Merge_sort_animation2.gif (13KB, 280x237px) Image search: [Google]
Merge_sort_animation2.gif
13KB, 280x237px
>>55627177
>>55627191
This is a visualisation of merge sort.
>>
>>55626814
Rololllololol
>>
>>55626814
zero intention of actually participating
>>
>>55626814
bored2deathplsgiveproject
>>
>>55627212
Thanks. I think I'm gonna go with my second one anyway, seems more exciting.
>>
>>55627105
i={3: "fizz", 5: "buzz"}
for j in range(1,100):
k = True
l=""
for m in i:
if j % m == 0:
l += i[m] + " "
k=False
if k: print(j)
else: print(l)
>>
pls no make your own chip8
>>
>>55627377
WEW LAD ALMOST 78 :D
>>
>>55626814
Roll
>>
>>55626814
RoLling
>>
>>55626814
k
>>
rol
>>
I'm already working on Conways game of life
>>
>>55627133
def area(points):
#calculate the area of a convex polygon with shoelace formula
#inputs: list of tuple vertex points
xys = zip(*points)
xs = xys[0]
ys = xys[1]
area = 0
n = len(points)
for i range(n-1):
area = area + xs[i]*(y[i+ 1] - y[i -1])
area = area + xs[n-1]*(y[0] - y[n-2])
return 0.5*abs(area)
>>
>>55626814
lets try this
>>
>>55626814
roll
>>
File: ebl.png (8KB, 468x72px) Image search: [Google]
ebl.png
8KB, 468x72px
>>55627113
 #include<cstdlib>
#include<iostream>
#include<vector>
#include<string>
#include<ctime>
#include<fstream>
using namespace std;

vector<string> loadEightballResponses(vector<string> &responses)
{
string response;
ifstream inFile;

inFile.open("answers.ebl");
while(inFile)
{
getline(inFile, response);
if (!inFile.eof())
responses.push_back(response);
}
inFile.close();
return responses;
}

int main(int argc, char *argv[])
{
int responseIndex;
vector<string> responses;
loadEightballResponses(responses);
string lol;

if (argc == 1)
{
cout << "Enter a question: ";
getline(cin, lol);
}
else
{
for (int i=1; i<argc; i++)
{
lol += " " + static_cast<string>(argv[i]);
}
}
cout << "You asked:" << lol << endl;
cout << "Press any key to shake the magic eight ball...";
cin.get();
srand(time(0));
responseIndex = rand() % responses.size();
cout << "The magic eightball says: " << responses[responseIndex] << endl;
return 0;
}
>>
>>55627733
Ah, balls. I goofed.
>>
>>55626814
rolling
>>
one moar
>>
rolling for something fun
>>
>>55626814
ralgo
>>
File: Hello World.png (685KB, 654x939px) Image search: [Google]
Hello World.png
685KB, 654x939px
Hell, this could be fun
>>
>>55626814
sproink
>>
Rolling again...
>>
import System.Random

main = do
(length, _) <- newStdGen >>= return . randomR (1,64)
password <- fmap (take length) $ newStdGen >>= return . randomRs ('a','z')
putStrLn password
>>
>>55626814
kill me
>>
>>55626814
rollando again
>>
>>55626814
Currently I am working on the Linux kernel but I can do one more project.
>>
>>55628032
Better be in haskell

Also rolling
>>
>>55628044
Already did that rerolling
>>
>>55628054
>evaluate binomial coefficients
I mean I guess

Just to make it harder I decided to write it in lisp which I have never written in before in my life and just looked up the syntax of

(defun binomial (n k) (/ (! n) (* (! (- n k)) (! k))))


rollin' again
>>
collie n | even n = n `div` 2
| otherwise = 3 * n + 1

--longest collatz under n

foo n = maximum $ map quux [1..n]
where quux g = length $ takeWhile (/=1) (iterate collie g)
>>
>>55628108
>Love calculator
I don't know what that means
>>
rollerooni
>>
File: christmas_tree.png (7KB, 279x605px) Image search: [Google]
christmas_tree.png
7KB, 279x605px
>>55626932

puts "Ey yo, enter a number you cuck: "
h = gets.chomp
h = (h.to_i < 8 ? 5 : (h.to_i/4))

puts "A".center(13)
puts "AAA".center(13)
["AAOAA", "AOAAAOA", "AAAOAOAAA", "AOAOAAAOAOA"].cycle(h) { |x| puts x.center(13) }

3.times do puts "XXX".center(13) end
>>
File: 2016-07-18-013828_840x888_scrot.png (50KB, 840x888px) Image search: [Google]
2016-07-18-013828_840x888_scrot.png
50KB, 840x888px
>>55628130
>>
roll
>>
TRUMP
>>
>>55626814
rollando aggerino
>>
>>55628165
nope
again
>>
>>55628152
>10010
>right now you have to add them but you add them two at a time
>So first you do 1 + 0
>10010
>Then 00
>10010
>And so on
What? That number didn't change at all
>>
>>55628181

Haha, good luck..
>>
>>55628190
i'd just need to learn gloss, fuck that there's no guide online
>>
rollin'
>>
>>55626814
Rollan
>>
I'll roll even though I'm a novice and half of this shit is greek to me.
>>
>>55626814

rolando
>>
>>55628274
print(open(__file__).read())
>>
>>55628107
Delivering

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
#define NUM_WORDS 8

int main() {
char *wordlist[NUM_WORDS] = {"cuck","kek","tendies","pepe","wojak","gbp","roastie","chad"};
int tries = 3;
int found[10] = {0};

srand((unsigned)time(NULL));
int choice = rand() % NUM_WORDS;

printf("Okay, faggot. Let's see if you're qualified to post at /r9k/\n");

while (tries) {
printf("\n\nGuess the word from the robot dialect. You have %d tries.\n", tries);

bool foundAllLetters = true;

for (int c = 0; wordlist[choice][c] != '\0'; c++) {
if (found[c]) {
printf(" %c ", wordlist[choice][c]);
} else {
printf(" _ ");
foundAllLetters = false;
}
}

if (foundAllLetters) {
printf("\n\nYou're dat boi who have a special seat amongst robots. Kudos, senpai!\n");
break;
}

printf("\n");
char letter;
bool foundLetter = false;
printf("Type a letter: ");
scanf("\n%c", &letter);

for (int c = 0; wordlist[choice][c] != '\0'; c++) {
if (wordlist[choice][c] == letter) {
found[c] = 1;
foundLetter = true;
}
}

if (foundLetter) {
printf("\nYou found one letter! Good for you, faggot.\n");
} else {
printf("\nWrong choice, dumbass.\n");
tries--;
if (!tries) {
printf("\nYou're not ready for /r9k/. Lurk moar!\n");
}
}

}

return 0;
}
>>
>>55626814
Sure
>>
>>55628736
Gay. Rolling again.
>>
~~
>>
>>55628905
nah.. again
>>
File: hodon.gif (38KB, 365x200px) Image search: [Google]
hodon.gif
38KB, 365x200px
>>55626814
>>
>>55626814
>for N00bz
I dont know what the fuck am I supposed to do
>>
>>55626814
ROLLING FOR c++
>>
>>55626814
Ok hope python works
>>
Rollin'
>>
rollan
>>
nope
>>
>>55626814
roll
>>
rolll
>>
>>55626814
fuck. If i can get code blocks to download on my old mac, sure.
>>
File: Capture.png (5KB, 645x115px) Image search: [Google]
Capture.png
5KB, 645x115px
thanks anon :^3
>>
Rellin'
>>
>>55626814
Roll
>>
>>55626814
roll
>>
>>55628206
here's the full code, too long to post
https://0x0.st/mWW.hs

and godanm I'm playing it now and it works wrong lol
fuck it though, i'm not spending any more time on it
>>
>>55629024

Drunk watching Mad Men. Answer in Swift:

var answerArray: [String] = [String]()

func decimalToBinary(var value: Int) -> [String] {

while value >= 1 {
if value % 2 == 0 {
answerArray.append("0")
value = value / 2
} else {
answerArray.append("1")
value = value / 2
}
}
if answerArray.count != 0 {
return answerArray.reverse()
} else {
return ["0"]
}
}
>>
>>55626814
rollingen auf
>>
>>55626814
Rolling
>>
>>55626814
roll
>>
Rolleroni
>>
>>55626814
how bout no
>>
>>55626814
llor
>>
Rolls
>>
>>55626814
lets go
>>
rollls
>>
>>55626814
roll
>>
>>55626814
wrole
>>
rollandino
>>
>>55626814
meh
>>
>>55626814
Roll
>>
Hit me up
>>
>>55630204
kek I'm a fucking idiot
static void Main(string[] args)
{
string key = "Your mum is gay xD";
byte[] buffer = new byte[4096];
int read;

using (var reader = new FileStream(args[0], FileMode.Open))
{
using (var writer = new FileStream(args[1], FileMode.OpenOrCreate))
{
while ((read = reader.Read(buffer, 0, buffer.Length)) > 0)
{
byte j = 0;
byte s = 0;

for (int i = 0; i < read; i++)
{
if (s > key.Length-1)
s = 0;

buffer[i] ^= (byte)key[s++];
buffer[i] ^= j++;
}
writer.Write(buffer, 0, read);
}
}
}
}
>>
>>55626814
roll
>>
>>55626814
rolling fucktard
>>
Rol
>>
>>55626814
lets do this. now or never
>>
>>55626814
Rollin'
>>
>>55630815
Reversing a string, the noob way:
string = "This is a string"
strlen = len(string)
count = 1
for x in string:
print(string[strlen - count], end="")
count += 1
>>
I haven't programmed in months, this is gonna be brutal
>>
>>55626814
Go
>>
OP here. I haven't programmed anything in 10 years.I just put this out so all everyone else can have some fun.
>>
>>55626814
rollan
>>
>>55626814
Roll
>>
Rollolling
>>
>>55626814
Rolling
>>
>>55631316
Meh, boring. That's one of the first things you do in college programming class.
>>
>>55626814
memez
>>
>>55626814
roll threads are against the rules
go back to /b/ kids
>>
>>55626814
ayy ez
>>
R°○◇□oO0ll
>>
>>55626814
It's gonna be too hard
>>
Let's see
>>
Rollerino
>>
rollio polio
>>
>>55631805
for i in range(1,100):
if i%15 == 0:
print "FizzBuzz"
elif i%5 == 0:
print "Buzz"
elif i%3 == 0:
print "Fizz"
else:
print i


Doing another cause I'm not that horrible
>>
>>55626814

Rolloing
>>
>>55626814
rollz
>>
>>55626814
> k
int main(){
int _[2048],O=(int)&O,__=~__+__;
while((__=-~__)^2048)__[_]=(O=(O*0x41C64E6D+12345)&0x7fffffff)&1024?1<<5:0;
while(usleep('d'<<'\n'),__+=~__){
while((__=-~__)^8192){
if(_[((__>>2)+2048+"\x01?@A"[__%4])%04000]&1<<5)*(_+(__>>2))=-~_[__>>2];
if(_[((__>>2)+04000-"\x01?@A"[__%4])%2048]&1<<5)*(_+(__>>2))=-~_[__>>2];
if(__%4==3)_[__>>2]|=_[__>>2]^'\"'&&_[__>>2]^'#'?((_[__>>2]^3)?0:1<<4):1<<4;};
while((__=-~__)^10240)if(putchar((_[__%2048]=_[__%2048]<<1&1<<5)?'X':' '),!(63^__%0100))putchar(10);}};
>>
rolling but not gonna do it
>>
rolll
>>
>>55631854
Rolling again cause I am dumb and I don't really know what binomial coefficients are.

Also firefox crashes when I try to open the wikipedia page about it.
>>
>>55626814
roll
>>
>>55626814
okay
>>
>>55626814
rrrrrrrr
>>
sdfaasdf
>>
>>55632457
public interface Comparator<T>
{
int compare(T o1, T o2);
boolean equals(Object obj)
}

public class Sorts
{
public static Collection<T> sort<T>(Collection<T> c1, Comparator<T> c)
{
List<T> res=new ArrayList();
while(c1.size()>0)
{
Iterator<String> i = c1.iterator();
T t2=null;
while (i.hasNext()) {
T s = i.next();
if(t2==null||s.compare(t2)>0)
t2=s;
}
c1.remove(t2);
res.add(t2);
}

}
return res;

}


T Pajeet.
>>
>>55626814
Roll
>>
>>55632623
Fucking stupid, reroll
>>
>>55626814
meh
>>
>>55633042
what the fuck
>>
sure
>>
How droll
>>
>>55631988
>I don't really know what binomial coefficients are

see >>55628108

binomial(n, k) = (n!) / ((n-k)! * (k!))
>>
>>55633320
Thanks!
>>
/me rolls
>>
>>55626814
rolling on the river
>>
N I G G E R
>>
>>55626814
oh yes baby
>>
#include <stdio.h>

int main()
{
for (int i = 2; i < 9; i++)
{
int this = i;
printf("\n%d, ", this);
while (this != 1)
{
if (this % 2 == 0)
{
this = this / 2;
}
else
{
this = this * 3 + 1;
}
printf("%d, ", this);
}
}
return 0;
}
~
>>
>>55626814
let's do this
>>
Royce
>>
>>55633214
>collatz conjecture
At first I was like wtf I have to implement an unsolved mathematics problem? But it was actually super simple (no need to actually solve it)

#!/usr/bin/env python3
def conjecture(n):
count = 0
while n != 1:
n = 3 * n + 1 if n % 2 else n / 2
count += 1
return "It took " + str(count) + " iterations until n == 1"
>>
>>55626814
roll something easy pls
>>
>>55632906
import random
options = ['Rock', 'Paper', 'Scissors', 'Lizard', 'Spock']
youranswer = str(input("Rock, Paper, Lizard, Scissors or Spock?: "))
if youranswer.upper() in str(options).upper():
myanswer = str(random.choice(options))
print(myanswer)
if myanswer.upper() == youranswer.upper():
print("Tie!")
elif (myanswer.upper() == "ROCK") and (youranswer.upper() == "PAPER"):
print("You Win!")
elif (myanswer.upper() == "ROCK") and (youranswer.upper() == "SPOCK"):
print("You Win!")
elif (myanswer.upper() == "PAPER") and (youranswer.upper() == "SCISSORS"):
print("You Win!")
elif (myanswer.upper() == "PAPER") and (youranswer.upper() == "LIZARD"):
print("You Win!")
elif (myanswer.upper() == "SCISSORS") and (youranswer.upper() == "ROCK"):
print("You Win!")
elif (myanswer.upper() == "SCISSORS") and (youranswer.upper() == "POCK"):
print("You Win!")
elif (myanswer.upper() == "LIZARD") and (youranswer.upper() == "ROCK"):
print("You Win!")
elif (myanswer.upper() == "LIZARD") and (youranswer.upper() == "SCISSORS"):
print("You Win!")
elif (myanswer.upper() == "SPOCK") and (youranswer.upper() == "LIZARD"):
print("You Win!")
elif (myanswer.upper() == "SPOCK") and (youranswer.upper() == "PAPER"):
print("You Win!")
else:
print("I Win!")
else:
print("Sorry, I don't know that game")
>>
>>55626814
Rollan
>>
roll for something fun
>>
>>55626814
Rolling
>>
>>55633962
I don't know what this is
>>
>>55626814
roll
>>
>>55633988
It's a board game where you try to guess a four-space color code by getting hints about how many colors you have right.
>>
>>55626814
Need something to do
Rollan
>>
#include <iostream>

int main(int argc, const char * argv[]) {

std::cout << "Input any number... I'll show you the true power of the Collatz Conjecture!" << std::endl;
int collatzNum;
std::cin >> collatzNum;

int counter = 0;

while(collatzNum != 1)
{
if(collatzNum%2 == 1)
{
collatzNum *= 3;
collatzNum++;
}
else{
collatzNum /= 2;
}

std::cout << "At " << counter++ << " collatzNum = " << collatzNum << std::endl;
}

return 0;
}


On an unrelated note.. I have absolutely no idea how to do the Knight's Tour
>>
>>55626814
Rollerino
>>
>>55630957
and I was right
include <stdio.h>                                                                                                      int main(){                                                         int array[10] = {1,6,10,4,5,8,9,2,7,3};
int sorted[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1
, -1};
int temp = array[0];
int loop; int k;
for(int i=0;i<10;i++){ k=0; loop = 1; while (loop){ if (array[i]>sorted[k] && k<9 && sorted[k]!=-1) k++;
else loop = 0; } if (sorted[k]!=-1){
for(int j=i;j>k;j--){
sorted[j]=sorted[j-1];
}
}
sorted[k]=array[i];
for(int i=0;i<10;i++){
printf("%d, ", sorted[i]);
}
printf("\n");
}
for(int i=0;i<10;i++){
printf("%d, ", sorted[i]);
}
printf("\n");
}


okay, rolling for the next one
>>
>>55626814
Here's a shitty brainfuck interpreter I just wrote with no support for "," because input is annoying and I don't care

const tape = []
const prgm = JSON.parse('["'+process.argv[2].split('').filter(a=>{return ['<','>','-','+',',','.','[',']'].includes(a)}).join('').replace(/\[/g, '",["').replace(/\]/g, '"],"')+'"]')
let ins = 0

;(function execute(p) {
p.forEach(e => {
if (typeof e == 'string') {
e.split('').forEach(c => {
({
'>': ()=>{ins++},
'<': ()=>{ins--},
'+': ()=>{tape[ins] = (tape[ins] || 0) + 1},
'-': ()=>{tape[ins] = (tape[ins] || 0) - 1},
'.': ()=>{process.stdout.write(String.fromCharCode(tape[ins] || 0))},
})[c]()
})
} else {
while (tape[ins]) execute(e)
}
})
})(prgm)
>>
>>55626814
i have no skills but roll
>>
import sys, pygame, datetime
from math import sin, cos, pi
pygame.init()

size = width, height = 640, 480
screen = pygame.display.set_mode(size)

black = 0, 0, 0
white = 255, 255, 255
red = 255, 0, 0

center = 320, 240

while True:
for event in pygame.event.get():
if event.type == pygame.QUIT: sys.exit()


screen.fill(black)
pygame.draw.circle(screen, white, center, 200, 2)
pygame.draw.circle(screen, white, center, 3, 0)

now = datetime.datetime.now()

endHour = round(cos((now.hour-3)*2*pi/12)*75,0)+320, round(sin((now.hour-3)*2*pi/12)*75,0)+240
pygame.draw.line(screen, white, center, endHour, 1)

endMinute = round(cos((now.minute-15)*2*pi/60)*170,0)+320, round(sin((now.minute-15)*2*pi/60)*170,0)+240
pygame.draw.line(screen, white, center, endMinute, 1)

endSecond = round(cos((now.second-15)*2*pi/60)*190,0)+320, round(sin((now.second-15)*2*pi/60)*190,0)+240
pygame.draw.line(screen, red, center, endSecond, 1)

pygame.display.flip()


Gui clock
Is it terrible?
>>
What the fuck is an "Oil spill game" ?
>>
>>55626814
rollin
>>
>>55626814
ROLOLO
>>
File: 0vloiw2.jpg (201KB, 538x799px) Image search: [Google]
0vloiw2.jpg
201KB, 538x799px
>>55626814
Rolling
>>
>>55627212
any anons know of some good resources to brush up on sorting algos? c++ or java resources are a ++
>>
I'll do this shit when I get home.
>>
>>55635069
rerolling what the fuck is an oil spill game
>>
>>55626814

But I don't even know how to write a single line of code.
>>
I don't know any programming languages so this should be interesting
>>
roll troll
>>
Hnnnnnggg
>>
>>55626814
Fuck it let's do this
>>
>>55626814
rollrcoaster
>>
>>55626814
Roll
>>
>>55626814
roll
>>
Anyone tried the name generator with python?
>>
>>55626814
roll
>>
>>55627727
Here's #27, I couldn't be arsed to make it work for very large numbers.
#include <stdio.h>
#define LOOPS 12

void fibonacci(int seed1, int seed2, int loops)
{
int next;
if (loops-- == 0)
return;
printf("\n%d", seed1);
next = seed1 + seed2;
fibonacci(seed2, next, loops);
}

int main(int argc, char *argv[])
{
fibonacci(0, 1, LOOPS);
return 0;
}

Also roll again.
>>
got some time to wate
>>
>>55626814
all the roll jokes have been done about a thousand times each, huh
>>
>>55626814
troll
>>
rollerino
>>
>>55627100
0 is True and so is 1.
>>
>>55626814
rolling for something fun/teaching
>>
>>55627833
Are you fucking serious.
(reroll)
>>
>>55637309
Fuck this. I'll just pick something from the list instead.
>>
>>55626814
rolling
>>
>>55626814

they see me rolling
>>
>>55637309
>>55637343
Calculating area should take 2 seconds to code. Making a pseudo-random phrase generator is pretty simple too.

Are those too easy for you?
>>
rolling, will try to make it in Scheme
>>
Still no idea what an oil spill game is
>>
>>55637704
I have no fucking idea how to make this so let's do it again
>>
>>55626814
Fuck it, not like I have anything better to do
>>
>>55637629

OK, I didn't make all 24 encryptions..
But here is a selection of them:

# init
$abc = Array('a'..'z')
$morse = <<END
a .- b -... c -.-. d -.. e . f ..-. g --. h .... i .. j .--- k -.-
l .-.. m -- n -. o --- p .--. q --.- r .-. s ... t - u ..- v ...-
w .-- x -..- y -.-- z --.. 0 ----- 1 .---- 2 ..--- 3 ...-- 4 ....-
5 ..... 6 -.... 7 --... 8 ---.. 9 ----. . .-.-.- , --..-- ? ..--.. ! ---.
END
$morse = Hash[*$morse.split(' ')]

# define encodings
class String
def atbash
self.chars.map! {|i| i==' ' ? i : $abc[25 - $abc.find_index(i).to_i]}.join
end
def caesarian_shift(n)
self.chars.map! {|i| i==' ' ? i : $abc[(n+$abc.find_index(i).to_i) % 26]}.join
end
def rot_13
caesarian_shift(13)
end
def morse
self.chars.map! {|i| i==' ' ? i : $morse[i]}.join(" ")
end
def vigenere(k)
k = k.chars
self.chars.map!{|i| if i!=' ' then i= i.caesarian_shift(k[0].ord - 97); k.rotate! end; i}.join
end
end


# test
t = "op is a faggot"
p t.atbash # "lk rh z uzttlg"
p t.caesarian_shift(5) # "tu nx f kfllty"
p t.rot_13 # "bc vf n snttbg"
p t.morse # "--- .--. .. ... .- ..-. .- --. --. --- -"
p t.vigenere("fugg") # "tj oy f zgmliz"
>>
hdnw
>>
>>55639205
package main
import "fmt"
func main() {
var fizzbuzz string
for i := 1;; i++ {
fizzbuzz = ""
if i%3==0 {fizzbuzz += "Fizz"}
if i%5==0 {fizzbuzz += "Buzz"}
if fizzbuzz == "" {fizzbuzz = fmt.Sprintf("%d",i)}
fmt.Printf("%s\n",fizzbuzz)
}
}

Also rolling again
>>
>>55639560
What is a details validator
>>
high roller spin.
>>
rollin rollin
>>
>Basic LISP Interpreter
>Text Editor
>Programming Projects for N00bz

wew
>>
>>55626814
rollio
>>
>>55639817
Those are both pretty fucking simple things
>>
File: rolling-pin.jpg (44KB, 700x466px) Image search: [Google]
rolling-pin.jpg
44KB, 700x466px
>>55626814
rolla rolla
>>
>>55626814
Rolleroonies
>>
>>55626814
Rolling
>>
dice.roll()
>>
>>55641805
is this me
>>
>>55626814
rolln
>>
>>55641901
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void) {

srand(time(NULL));

if(rand()%2 == 0)
printf("Heads\n");
else
printf("Tails\n");

getchar();
return 0;
}


reroll
>>
rollan
>>
These vary massively in complexity
>>
>>55641709
For noobs?

My understanding is that noob = person who has little to no experience with programming. I know actual professional software engineers who would probably have a hard time doing some of these "noob challenges".

actual noob challenges:
- Implement Quicksort
- Hangman
- Simple inventory program using linked list
- Basic calculator
you get the idea...
>>
>>55626814
pls no ascii shit
>>
>>55642461
>I know actual professional software engineers who would probably have a hard time doing some of these "noob challenges"
I really doubt that. If it's true, they have absolutely no business doing being professional software engineers. Some of these things are annoyingly time consuming, but none of them should give an actual programmer any trouble. They *should* give noobs trouble, because they're challenges for them.

Also noob is a pretty informal term, but I wouldn't call someone with no programming experience at all a "programming noob". More like a "non-programmer"
As for a "little experience," that's pretty vague as well, but I believe "noob" can pretty easily reach into the range of programmers that these are challenging to.

And why exactly do you think a hangman game or a calculator would be significantly more complicated to write than a text editor? All a basic text editor is is printing characters that the user types and moving the terminal cursor around on arrow keys. It's a handful of lines of code at most
>>
>>55642643
>more complicated
*less
>>
role
>>
>>55642787
Wait what am I supposed to do? Pascals triangle has a formula... n!/(k!(n-k)!)
>>
Programmer here...

>>55642643
A handful of lines of code? What exactly do you consider a text editor? I've never written one but I was impressed by this 1K LOC project by antirez https://github.com/antirez/kilo. I guess if you depended on ncurses you could shit one out pretty easily but still I could see a beginner easily getting lost in the weeds.
>>
>>55626814
roolllllll
>>
please go easy on me
>>
Roland
>>
>>55644616
It's so simple, but it just keeps getting uglier. I wanted to expand it so vectors of strings produce vectors of numbers.

vowelCount <- function(x){
if(class(x)!="character"){
stop("non-character argument provided to vowelCount")
}
result <- NULL
x<-toupper(x)
entries <- strsplit(x, split="")
for(i in 1:length(entries)){
vcount <- 0
for(j in 1:length(entries[[i]])){
if(entries[[i]][j]%in%c("A","E","I","O","U")){
vcount <- vcount+1
}
}
result <- c(result, vcount)
}
result
}

vowelCount("This is a test")
# [1] 4

vowelCount(c("This", "is", "another", "test"))
# [1] 1 1 3 1

>>
>>55626814
roll, nothing I've done please
>>
yo im a total skid so maybe ill ask you guys,

I need to write a program that searches one text file and matches it with another and gives results. I finally opened the book I have on C i bought months ago.. so pls point me in a direction i guess?
>>
Eh, why not.
>>
>>55626814
Fuck it.
>>
>>55626814
Rollercoaster
>>
>>55637113
No, it's not. In booleans 0 is false and 1 is true, are you fucking retarded?
>>
>>55626814
Rolling.
>>
rollpokie
>>
>>55626814
I am not a robot
>>
>>55626814
roll
>>
Some of these are really simple, some are ROLLING not
>>
>>55626814
>>
>>55626814
Roll
>>
>>55647418
I can't do GUI's, reroll.
>>
>>55626814
Probably won't be able to make it, but fuck. Hope it's something easy.
>>
>>55647427
extern crate num;

use num::{BigUint, Zero, One};

fn main() {
let mut a: BigUint = One::one();
let mut b: BigUint = One::one();
let mut temp: BigUint;
loop {
println!("{}", a);
temp = a + &b;
a = b;
b = temp;
}
}

Rust
>>
>>55647499

Seriously what the fuck is that, like fuck. Rerolling
>>
>>55626814
Ryll
>>
File: dont worry friend.jpg (65KB, 334x334px) Image search: [Google]
dont worry friend.jpg
65KB, 334x334px
ok
>>
>>55647972

Boring shit, fuck that.
re
>>
>>55647999
n = int(input())
i = 0
k = n
if n < 1:
print("fuck you, positive integers only")
exit()
while n != 1:
n = n//2 if n % 2 == 0 else 3*n + 1
i += 1
print("{} reaches 1 in {} steps".format(k, i))


This problem should really be named Collatz conjecture instead of "hailstone sequence" in the image.
>>
>>55647522
That is fucking easy. You are a disgrace if you can't do that. https://www.math.hmc.edu/funfacts/ffiles/10008.5.shtml
>>
>>55647999
Checked
>>
anotha one
>>
>>55626814
roll
>>
>>55648246

What the shit
anotha one
>>
>>55647418
Minesweeper doesn't need a gui
>>
rollang
>>
>>55647522
Google it mang
>>
>>55626814
roll
>>
>>55648275
Already made one, rerollin
>>
use std::io;

fn main() {
for n in 1.. {
Collatz(n);
}
}

fn Collatz(mut n: i64) {
let input = n.clone();
let mut steps = 0;
while n > 1 {
if n % 2 == 0 {
n /= 2;
} else {
n = n * 3 + 1;
}
steps += 1;
}
println!("{} reached 1 in {} steps.", input, steps);
}

Reroll
>>
Lmao u faggets
>>
>>55626814
Rolling
>>
nub
>>
>>55626814
rollerin0
>>
File: 1468030745258.jpg (116KB, 720x583px) Image search: [Google]
1468030745258.jpg
116KB, 720x583px
Why when you can roll this
>>
File: day 1 dlc.jpg (99KB, 600x665px) Image search: [Google]
day 1 dlc.jpg
99KB, 600x665px
>>55626814
sure
>>
Dear Princess Celestia: Sorting is magic!

Today I learned some code magic.

Did you know that My Spells is a numbers? On the 1 page of the book “My Spells” I wrote 4. On the 1 page of the book “My Spells” I wrote 6. On the 1 page of the book “My Spells” I wrote 3. Did you know that bookpages is a number 3?

I learned swapping two pages using Spell book using first page number using second page number. Did you know that temporary note likes number? On the first page of the book “Spell” I read about temporary note. On the first page of the book “Spell” I wrote I knew about on the second page of the book “Spell” I read about. On the second page of the book “Spell” I wrote I knew about temporary note. That’s all about swapping two pages!

I learned spell sorting using Spell book using bookpages. Did you know that counter is a number 1? Here’s what I did while bookpages greater than 1: as long as counter no more than bookpages subtract 1, when on the counter page of the book “Spell” I read about more than on the counter and 1 page of the book “Spell” I read about, swapping two pages using Spell using bookpages – that’s what I would do; counter likes number the 1 added to counter. That’s what I did, bookpages is the bookpages subtract 1, that’s what I did. Then you get the Spell! That’s all about spell sorting!

Spell sorting using My Spells using bookpages.

Your faithful student, Rainbow Dash.


FiM++
>>
sure boi
>>
>>55626814
cat /dev/random
>>
>>55626814
Plz
>>

class FizzBuzzety
{
static void Main(string[] args)
{
byte count=0;
do
{
count++;
if (IsAMultipleOf(count, 3))
{
Console.WriteLine("Fizz");
}
else if (IsAMultipleOf(count, 5))
{
Console.WriteLine("Buzz");
}
else
{
Console.WriteLine(count);
}
}
while (count < 101);
Console.ReadKey();
}
static bool IsAMultipleOf(byte i, byte n)
{
return (i%n) == 0;
}
}
>>
Let's gooo
>>
>>55626814
roll
>>
>>55626814
rollypolly
>>
>>55626814
lmao
>>
>>55626814
roll
Thread posts: 269
Thread images: 15


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.