Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » What's the funniest code we can think of?
- GameCoder2010
-
Scratcher
16 posts
What's the funniest code we can think of?
if not my_bool == False or not my_bool != True:
return not not my_bool == True
else if not not my_bool != False or my_bool != True:
return not not not not my_bool == True
- TheSecondGilbert
-
Scratcher
100+ posts
What's the funniest code we can think of?
(bump)# This Python code gets more cursed the more you read it. def __main__()->None: i = 1 while i <= 100: out: tuple = "" if (i % 15 == 0): print( "FizzBuzz" ,) elif not( i % 3): ( print('''F''' '''i''' '''z''' '''z''') ) elif divmod( i, 5) [ 1 : ] == \ ( 0 , ) : print("B", "u", "z", "z", sep = "") else: print (i) i = i + 1#increment i try: __import__ ( __name__ ) . __getattribute__ ( __name__ ) (); 1; 1; 1; 1; 1; 1; 1; 1 ;1 ;1 ;1 ;1 ;1; 1;1;2;1;1;11;1;111;11;1 except: 0.
************* Module cursed
cursed.py:3:0: W0311: Bad indentation. Found 1 spaces, expected 4 (bad-indentation)
cursed.py:4:0: W0311: Bad indentation. Found 1 spaces, expected 4 (bad-indentation)
cursed.py:5:0: W0311: Bad indentation. Found 3 spaces, expected 8 (bad-indentation)
cursed.py:6:0: W0311: Bad indentation. Found 3 spaces, expected 8 (bad-indentation)
cursed.py:9:0: W0311: Bad indentation. Found 7 spaces, expected 12 (bad-indentation)
cursed.py:12:0: W0311: Bad indentation. Found 3 spaces, expected 8 (bad-indentation)
cursed.py:12:0: C0325: Unnecessary parens after 'not' keyword (superfluous-parens)
cursed.py:18:0: W0311: Bad indentation. Found 3 spaces, expected 8 (bad-indentation)
cursed.py:22:0: W0311: Bad indentation. Found 3 spaces, expected 8 (bad-indentation)
cursed.py:23:0: C0301: Line too long (218/100) (line-too-long)
cursed.py:23:0: W0311: Bad indentation. Found 95 spaces, expected 12 (bad-indentation)
cursed.py:24:0: W0311: Bad indentation. Found 3 spaces, expected 8 (bad-indentation)
cursed.py:25:0: C0301: Line too long (128/100) (line-too-long)
cursed.py:1:0: C0114: Missing module docstring (missing-module-docstring)
cursed.py:12:21: C0321: More than one statement on a single line (multiple-statements)
cursed.py:5:3: W0612: Unused variable 'out' (unused-variable)
cursed.py:26:0: W0702: No exception type(s) specified (bare-except)
cursed.py:25:5: C0321: More than one statement on a single line (multiple-statements)
cursed.py:25:5: C2801: Unnecessarily calls dunder method __getattribute__. Access attribute directly or use getattr built-in function. (unnecessary-dunder-call)
cursed.py:25:65: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:68: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:71: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:74: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:77: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:80: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:83: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:86: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:89: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:92: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:95: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:98: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:101: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:105: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:107: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:109: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:111: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:113: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:115: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:118: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:120: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:124: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:25:127: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:26:8: W0104: Statement seems to have no effect (pointless-statement)
cursed.py:26:8: C0321: More than one statement on a single line (multiple-statements)
------------------------------------------------------------------
Your code has been rated at 0.00/10
Last edited by TheSecondGilbert (Nov. 23, 2023 02:55:09)
- Vaibhs11
-
Scratcher
1000+ posts
What's the funniest code we can think of?
#include <stdio.h> #include <math.h> int main(){int x=1,y=0,f[12],a,b,c,d,ad,bd,cd,n,i;double at;f[4]=2;for(i=0;i<10;i++){if(i>f[4]){n=x+y;y=x;x=n;f[i]=n;}}f[1]=0;ad=f[9];bd=f[6];cd=f[4];at=(sqrt((f[6]+f[4])*pow(f[4],f[4]))/sqrt(f[6]+f[4]))*(sqrt(pow(f[6]+f[4],f[5]))/sqrt(f[6]+f[4]))*(f[6]+f[4]);a=at;b=pow(pow(f[4],f[4])+pow(f[4],f[1]),f[4])*pow(f[4],f[4])+pow(f[4],pow(f[4],f[4]))-f[4];c=(f[3]<<f[6]+f[4])-f[8]+f[4];d=(ad*pow(cd,cd)*pow(bd,cd)+pow(cd,cd)*pow(bd,cd+f[3]))/pow(pow(cd,cd)+pow(cd,f[1]),cd);printf("%c",a);printf("%c",b);printf("%c",c);printf("%c",d);return 0;}
And… I made it unreadable too! 4 hours, unprecisely.
Try it out on replit: https://replit.com/@V256/Bruh
Last edited by Vaibhs11 (Dec. 1, 2023 03:13:02)
- bugsyk2009
-
Scratcher
500+ posts
What's the funniest code we can think of?
Someone has probably already posted this before, but I don't have access to Ocular right now to check, so one from XKCD:
int getRandomNumber() { return 4; // chosen by fair dice roll. // guaranteed to be random. }
- Vaibhs11
-
Scratcher
1000+ posts
What's the funniest code we can think of?
Someone has probably already posted this before, but I don't have access to Ocular right now to check, so one from XKCD:https://scratch.mit.edu/discuss/post/629628 (#13)int getRandomNumber() { return 4; // chosen by fair dice roll. // guaranteed to be random. }
https://scratch.mit.edu/discuss/post/6831708 (#1435)public int GetRandomNumber(maxNum) { return 12; }
int main() { // statistically proven to be random int x; std::cout << x << '\n' return 0; }
- gilbert_given_189
-
Scratcher
1000+ posts
What's the funniest code we can think of?
https://scratch.mit.edu/discuss/post/6831708 (#1435)int main() { // statistically proven to be random int x; std::cout << x << '\n' return 0; }
int main() { // statistically proven to be random int* x = malloc(sizeof(int)); printf("%d", x); free(x); // because we're not monsters return 0; }
- Vaibhs11
-
Scratcher
1000+ posts
What's the funniest code we can think of?
noooofree(x); // because we're not monsters
- Dyanoa
-
Scratcher
100+ posts
What's the funniest code we can think of?
Lol, printtext:“never gonna give you up”https://scratch.mit.edu/discuss/post/6831708 (#1435)int main() { // statistically proven to be random int x; std::cout << x << '\n' return 0; }int main() { // statistically proven to be random int* x = malloc(sizeof(int)); printf("%d", x); free(x); // because we're not monsters return 0; }
- Epsilon_3
-
Scratcher
500+ posts
What's the funniest code we can think of?
Aye, they got a point.lol but then why even use scratch forumsy dont yall use scratch codeWe're ATers, it's what (most of us) don't do anymore lolwhen green flag clicked
stop [all v]
if ur not gonna do anything about scratch
(don't wanna be mean, just pointing it out
https://scratch.mit.edu/projects/787009097/ (credit to the scratcher that made it)
Not really funny, but boy is it enlightening.
- gilbert_given_189
-
Scratcher
1000+ posts
What's the funniest code we can think of?
let _; for (let i in [...Array(100)]) i = Number(i) + 1, out = "", i % 3 ? _ : out += "Fizz", i % 5 ? _ : out += "Buzz", out ? console.log(out) : console.log(i);
i = 0 while (..., i < 100, i := i + 1)[1]: { out := "", None if i % 3 else (out := out + "Fizz"), None if i % 5 else (out := out + "Buzz"), print(out) if out else print(i) }
Last edited by gilbert_given_189 (Sept. 8, 2024 07:20:27)
- SpyCoderX
-
Scratcher
1000+ posts
What's the funniest code we can think of?
while true: word = input("Enter your username") print("Please enter a value greater than -4,294,967,296")
Have fun trying to sign in… using this very real prompt XD
Last edited by SpyCoderX (Sept. 8, 2024 04:10:54)
- breakfast_for_dinner
-
Scratcher
1000+ posts
What's the funniest code we can think of?
i once made a rust program that adds a number and 1 together. the design is very human
use std::mem;
// returns the next whole number after the given number, "num"
fn increment(num: u8) -> i32 {
unsafe {
let current_num: i8 = mem::transmute::<[u8; 1], i8>([num]);
if match format!("{}", current_num).contains(".") {
true => "float",
false => "integer"
} == "integer" {
let to_add: i8 = 1;
return (current_num.wrapping_add(to_add)) as i32;
} else {
panic!("this is a float");
}
}
}
- mybearworld
-
Scratcher
1000+ posts
What's the funniest code we can think of?
The agile enterprise object-oriented encapsulated composition-based SOLID FizzBuzz program in a Microsoft-backed programming language.
class FizzBuzz { constructor() { const counter = new Counter(); const looper = new Looper(); const counterBoundsChecker = new CounterBoundsChecker(counter, 101); const fizzBuzzMainLoop = new FizzBuzzMainLoop(counter); looper.doWhile(counterBoundsChecker, fizzBuzzMainLoop); } } class Counter { private count: number = 1; increment() { this.count++; } get value() { return this.count; } } class CounterBoundsChecker implements Checker { private counter: Counter; private maximum: number; constructor(counter: Counter, maximum: number) { this.counter = counter; this.maximum = maximum; } check() { return this.counter.value < this.maximum; } } class FizzBuzzMainLoop implements Executor { private counter: Counter; constructor(counter: Counter) { this.counter = counter; } execute() { const conditionalExecutor = new ConditionalExecutor(); const divisibleBy3Checker = new CounterDivisibilityChecker(this.counter, 3); const divisibleBy5Checker = new CounterDivisibilityChecker(this.counter, 5); const divisibleByBoth3And5Checker = new DoubleChecker( divisibleBy3Checker, divisibleBy5Checker ); const fizzPrinter = new Printer("Fizz"); const buzzPrinter = new Printer("Buzz"); const fizzBuzzPrinter = new Printer("FizzBuzz"); const numberPrinter = new Printer(this.counter.value.toString()); try { conditionalExecutor.executeConditionally( divisibleByBoth3And5Checker, fizzBuzzPrinter ); } catch { this.counter.increment(); return; } try { conditionalExecutor.executeConditionally( divisibleBy3Checker, fizzPrinter ); } catch { this.counter.increment(); return; } try { conditionalExecutor.executeConditionally( divisibleBy5Checker, buzzPrinter ); } catch { this.counter.increment(); return; } try { numberPrinter.execute(); } catch {} this.counter.increment(); } } class Printer implements Executor { private message: string; constructor(message: string) { this.message = message; } execute() { console.log(this.message); throw new Error(); } } class CounterDivisibilityChecker implements Checker { private counter: Counter; private number: number; constructor(counter: Counter, number: number) { this.counter = counter; this.number = number; } check() { return this.counter.value % this.number === 0; } } class Looper { doWhile(condition: Checker, body: Executor) { while (condition.check()) { body.execute(); } } } class ConditionalExecutor { executeConditionally(checker: Checker, body: Executor) { if (checker.check()) { body.execute(); } } } class DoubleChecker implements Checker { private checker1: Checker; private checker2: Checker; constructor(checker1: Checker, checker2: Checker) { this.checker1 = checker1; this.checker2 = checker2; } check() { return this.checker1.check() && this.checker2.check(); } } interface Checker { check(): boolean; } interface Executor { execute(): void; } new FizzBuzz();
- Jonathan50
-
Scratcher
1000+ posts
What's the funniest code we can think of?
When you get the root password wrong the first two times, then just do it the other way
I wonder if anyone will get the joke
I can't be the first person to think of this (edit: I'M NOT)
not the same as this
su
su
sudo
I can't be the first person to think of this (edit: I'M NOT)
not the same as this
Last edited by Jonathan50 (Nov. 20, 2024 02:37:10)
- 8to16
-
Scratcher
1000+ posts
What's the funniest code we can think of?
idk if scratch counts here but
when gf clicked
if {move (10) steps} then {
when gf clicked
(answer)
}::control
wait [this script v] seconds
- BigNate469
-
Scratcher
1000+ posts
What's the funniest code we can think of?
{ const irony = function(thing) { return !(thing); }; } irony();
Uncaught ReferenceError: irony is not defined
at <anonymous>:6:1
Last edited by BigNate469 (Nov. 22, 2024 15:44:38)
- i_eat_coffee
-
Scratcher
1000+ posts
What's the funniest code we can think of?
Any code written in Obscure.
- Discussion Forums
- » Advanced Topics
-
» What's the funniest code we can think of?
















