Share your repls and programming experiences

← Back to all posts
Show this to your mean math teacher
h
RohilPatel (1535)

Disclaimer: this is by no means to offend teachers, but more rather to joke with them

So I decided to make something I couldn't a while back. This was an easy project. I basically found a mean, median, mode, and range of stuff and it basically does things that you want it to.

Have you ever just HATED using the median stuff, writing it all down, like bruh. Just use my calculator!

Oh yeah @DynamicSquid , do squids go to school, and if so are their math teachers mean?

Comments
hotnewtop
DynamicSquid (4635)

Yes, squids do go to school. And yes, math teachers are very mean. They make us memorize the 240x240 multiplication table! They say that we can use our suckers to help us, but still, that's a lot!

RohilPatel (1535)

Hmm, another question, are squids purple or pink? Or is it just based on their ethnicity? Also wow, those suckers must have brains @DynamicSquid

DynamicSquid (4635)

@RohilPatel Well, most aquatic squids are a pinkish colour. Some aquatic squids are also light blueish as well. You might be darker or lighter depending on which sea you come from though.

RohilPatel (1535)

Ok lol looks like u studied oceanography lol @DynamicSquid

elipie (364)

@DynamicSquid are the english teachers mean? (cause for pie's they are very VERY epic)

elipie (364)

@RohilPatel hmm do people even know what reeee means, search it up if you don't

RohilPatel (1535)

lol ok. do u like this project? @elipie

elipie (364)

@RohilPatel yes. (on online a period means it is serious)

RohilPatel (1535)

nice, i would appreicate an upvote. thanks! also, it means nothing weird, just something to say when ur scared lmao @elipie

elipie (364)

@RohilPatel oh it doesn't mean something weird, just search it up. (i give u hint, it has something to do with the 2016 american election, it popped up in my recommend in yt)

RohilPatel (1535)

anything with that election was weird llol @elipie

elipie (364)

@RohilPatel ikkkkkkkkkkkrrrrrrrrrrrr

elipie (364)

@RohilPatel i bet the 2020 will be even weirder.

RohilPatel (1535)

yup. i mean i wont say who is better for pres online, but like ur right @elipie

elipie (364)

@RohilPatel ... reeeeee (scared lmao) go biden

elipie (364)

@RohilPatel whoops before reload already said...

elipie (364)

@RohilPatel ima go work on my os now

RohilPatel (1535)

is it a real os lol? im going to work on my repl.it replacement @elipie

elipie (364)

@RohilPatel yes, my mom asked me and said if i can make a better os than linux, i can get a pc upgrade (i might as well have taken that new graphics card rn)

hello4691 (31)

@DynamicSquid I had no idea squids could code! That's pretty neat

RohilPatel (1535)

I didn't know till he told me lol, there are some multilingual octopi @hello4691

SwaroopBappanad (243)

@DynamicSquid So are you from the Mediterranean, or the Pacific, or what?

RohilPatel (1535)

Obviously the southern if he is awake all day @SwaroopBappanad

LTI2 (116)

@DynamicSquid How about octototototototototototopuseseseseseseseseseses

SwaroopBappanad (243)

@LTI2 uhhhh, isn't it octopi or something? also, SHHHHH! who knows, they might be DynamicSquid's mortal nemesis.

MemeManHimself (100)

@RohilPatel Lol. Wanna work on the Discord bot? Or help me with the one I currently have? I've learned a lot of Discord.js since we last did our collab

RohilPatel (1535)

I mean whatever works, I need to finish some homework @MemeManHimself

MemeManHimself (100)

@RohilPatel Lmao ok it's just that whenever we plan to we never end up doing it

MemeManHimself (100)

@RohilPatel Lolye. Also I just got outta school :))) Tell me when you're ready please

DynamicSquid (4635)

@MemeManHimself You get on repl.it after school? I go on repl.it during school. Saves me a lot of time, well, if I don't get my phone taken away that is

LTI2 (116)

@DynamicSquid You go on during school? I hack into my school's electricity and delete my school

DynamicSquid (4635)

@LTI2 I hack into my school's brick walls and turn them into straw

MemeManHimself (100)

I go on it before and after, @DynamicSquid. :P

LTI2 (116)

@DynamicSquid Well, time to hack the school and turn it into a google image

Whippingdot (573)

You guys went WAY off topic. @RohilPatel and @elipie, I didn't understand a thing you were talking about.

@DynamicSquid, make sure you call a wolf to blow the school down too. And I don't think teachers are mean, if you are not counting Social Studies ones.

@SwaroopBappanad, I am sad you have the same profile pic as me.

@LTI2, wait until you start going to school again(not online), then you will be turned into an image too. Then only you will fit inside the school.

AgastyaSandhuja (172)

@RohilPatel @DynamicSquid let's make this the longest comment thread in repl.it :D

firefish (915)

@MemeManHimself Apparently there is a limit on names:

Don't ask, I just filled up the first name box with

The longest name ever invented. So, from what other people have done, this space has enough room to write an essay, unlike the 140 characters in the box below. How annoying can this get? I'm actually just waiting for there to be a little red error message, but I don't think there is. Wow, if this was my real name, the text on my passport photo page would have to be microscopic.

Whippingdot (573)

@RohilPatel @SwaroopBappanad Who will it be. You, or, wait for it.... DAN DAN DANNNNN,

me!

SwaroopBappanad (243)

@RohilPatel Lemme fix that sentence for you. "I median whatever works, I need to finish some homework"

RohilPatel (1535)

Bruhhhhh. Did you like this project? If so, upvote, otherwise tell me what I could fix.

(Top notch if statements)
@SwaroopBappanad

Whippingdot (573)

Hey, @SwaroopBappanad giving random sus. Vote him out.

firefish (915)

@SwaroopBappanad what in earth does that image mean,
just some weird cartoon armless people wearing funny hats

RohilPatel (1535)

I see 10 nifty upvotes from this one comment lmao @DynamicSquid

DynamicSquid (4635)

@RohilPatel don't mind me, just banking in some cycles lol

DynamicSquid (4635)

@firefish do you not know what Among Us is

code913 (16)

continuing this thread

firefish (915)

@DynamicSquid le no

call me uncultured if you will, i've been called that many times for not being interested in playing video games or anything of the sort, rather than making them
firefish (915)

@elipie

(on online a period means it is serious)

er ok

[deleted]

On the base level (and in most of its mainstream usage), REEEE simply refers to a scream. Often it is used as a reaction to someone getting provoked or triggered, like a streamer reacting poorly to a bad beat or an unfortunate turn of events on [email protected]

Superblammao (7)

@DynamicSquid lol, i never knew squids went to school!

SwaroopBappanad (243)

@firefish Legend has it they lost their arms in electrical

LegendaryWolf (706)

bruh, @DynamicSquid, moi teacher made us memorize till 30 table :(

AJDevelopment (137)

I was expecting something like

Average: number
Median: number
Mode: number
Range: number, number...
Mean: The Teacher

RohilPatel (1535)

oO sorry to disappoint you! @AJDevelopment

[deleted]

@AJDevelopment Totally! It would be awesome lol

RahulChoubey1 (134)

How do the "increase/decrease input" buttons work?

MemeManHimself (100)

@RahulChoubey1 They are automatically there :P

RahulChoubey1 (134)

@MemeManHimself I didn't realize there was a type of number for inputs

RohilPatel (1535)

Well basically we append to a div. look at the code! @RahulChoubey1

RohilPatel (1535)

Thanks. Did you upvote? If not please do! @clawstrike

CodingRedpanda (180)

@DynamicSquid you should make a website with all the information about squids, because at this rate point poeple are gonna ask a lot

[deleted]

Rohil what if ur math teacher is actually a English teacher?

code913 (16)

I'm blessed to never have a mean math teacher in my entire school life till now.

FlaminHotValdez (442)

LMAO... Thankfully I'm past the level where I have to do mean median mode range

FlaminHotValdez (442)

Adding on my previous comment... If you do mean median mode range you probably do standard deviation too. Can you plz add something to find standard deviation and outliers? Alg 2 sucks

RohilPatel (1535)

Sorry for seeing this half a year later, but I could cook one up lol. I'll say Algrebra 2 must suck, even though I tested out of it. @FlaminHotValdez

FlaminHotValdez (442)

@RohilPatel AHAHAHAHA I completely forgot about it...I'm done with algebra 2 now, I'm in precalc.

RohilPatel (1535)

Hee hee, I'm taking precalc this year as well. I feel like precalc is way to easy, like bruh @FlaminHotValdez

FlaminHotValdez (442)

@RohilPatel unit circle is a pain, formulas too

Whippingdot (573)

I have been trying to create a fraction simplifier in Python for DECADES. If you anyone knows how to do this please comment here.

fuzzyastrocat (1513)

@Whippingdot

def simplify_fraction(frac):
  lowest = min(frac)
  for i in range(frac[1]):
    if i == 0:
      continue
      
    while lowest % (i + 1) == 0:
      frac[1] /= (i + 1)
      frac[0] /= (i + 1)
      lowest  /= (i + 1)
  return frac

print(simplify_fraction([40, 80])) # 40 / 80 => 1 / 2

I'm not exactly sure if this is foolproof, I just quickly whipped it up, but I hope this helps.

Basically, it tries integers from 2 to the lowest of the numerator and denominator. While the denominator is divisible evenly by that integer, it divides both the numerator and the denominator evenly by that number to reduce the fraction.

RohilPatel (1535)

u just need to find the gcf @fuzzyastrocat

fuzzyastrocat (1513)

@RohilPatel Right, as I said this was a quick-and-dirty solution so it probably isn't the most efficient.

FlaminHotValdez (442)

@Whippingdot Basically, you can check every number from 2 to the smaller number and see if they're both divisible. Then divide.

FlaminHotValdez (442)

@Whippindot Alternatively you could also find the GCF, which is probably easier.

Whippingdot (573)

Wait @maxyang, @RohilPatel, and @fuzzyastrocat, I have a HCF/GCD calc:
https://repl.it/@Whippingdot/Python-Practice#main.py
(or)

first_num = int(input("Enter the first number: "))
second_num = int(input("Enter the second number: "))
counter = 2
gcd = 0


while counter <= first_num and counter <= second_num:
    if second_num % counter == 0 and first_num % counter == 0:
        gcd = counter
    counter += 1

if first_num == second_num:
    print(f"The numbers {first_num} and {second_num} are equal.")
elif gcd == 0:
    print(f"The numbers {first_num} and {second_num} are co-prime so it is {first_num}.")
else:
    print(f"The HCF/GCD of the numbers {first_num} and {second_num} is {gcd}.")

I can use the code in this? Wait, let me try it. The main prob I had was finding out if you needed to simplify the fraction.

FlaminHotValdez (442)

@Whippingdot You simply have to divide the numerator and the denominator of the GCF.

Whippingdot (573)

I have finished the code. I am sharing it with ur names. @maxyang, @RohilPatel, and @fuzzyastrocat

Whippingdot (573)

Bro, I don't know why but when I share it gives the error "Cannot post on a locked board". Do you know why?? @RohilPatel

RohilPatel (1535)

you must be posting on a locked board. simple. what are u posting to? if its announcements, it wont work. try clicking share. @Whippingdot

Whippingdot (573)

I am clicking share on the repl itself. I am going to try creating a new post and sharing. One sec. @RohilPatel

RohilPatel (1535)

hmm, im not sure. try asking a moderator @Whippingdot

Whippingdot (573)

Ok, I can't post anything @RohilPatel. Can you try writing contents or a title in a new post. I can't do that either. @moderation, Can you look into this.

Whippingdot (573)

@RohilPatel, it worked now. I have shared it. Check it out:
Show this to your nice math teacher!

Sry if the name is kinda copied from your's. I can change it. Just though it would be funny.

RohilPatel (1535)

Got like no cycles, so I don't care lol @Whippingdot

Whippingdot (573)

yeet why you bully me. If it did good then... @RohilPatel

Whippingdot (573)

Hey, sry to ruin the mode but I think the Median doesn't work. The Average and Range show NaN also. My input: 55, 44, 44, 22, 22, 4, 4,
The Median was 33(what) and the Mode was 4, 22, and 44(correct).

RohilPatel (1535)

you didnt see that? you must have had an error. try it again. maybe u had more characters I don't know @Whippingdot

Whippingdot (573)

Oh, @RohilPatel, I had an empty box at the end. That must've been why. Thanks!

RohilPatel (1535)

Oh lol. If u like it now, please upvote, it means a lot to me! Thanks! @Whippingdot

RohilPatel (1535)

I just read the first comment of this again, "sorry to read the mode", and I was like brehhehh. At first I thought it was a typo. U got me! @Whippingdot

Whippingdot (573)

What??? @RohilPatel. It says 'ruin', I am pretty sure. Are my eyes tricking me??

Whippingdot (573)

beruh why have you been inactive for a long time? @RohilPatel

RohilPatel (1535)

I haven't had any good project ideas, and when I do code, (you can see on my profile here), I just never finish them @Whippingdot

Whippingdot (573)

But you also haven't been responding to comments...like you are now... @RohilPatel

RohilPatel (1535)

I've done a few lol. I should make more posts, I just don't want to be a hypocrite and make low effort ones @Whippingdot

JadenKim2 (2)

lol teachers can't take jokes so they'll still get offended anyway

ike_fite (12)

@DynamicSquid Are you friends with octopuses or are they your arch-rivals?
Edit: fixed grammar

ike_fite (12)

@DynamicSquid Oh, Yeah. Forgot.
just because your cousins doesn't mean you can't hate each other tho.

FlaminHotValdez (442)

@DynamicSquid What?! You don't know your cousins' names?! It's octopi not octopuses!

DynamicSquid (4635)

@maxyang WhAt?! YoU dOn'T kNoW yOuR cOuSiNs' NaMeS?! iT's OcToPi NoT oCtOpUsEs!

Whippingdot (573)

That was a sentence full of abbreviations.

Confusing...

@DynamicSquid

ike_fite (12)

love how half the comments are about the ethnicity of squids.

RohilPatel (1535)

Well I mean if we talk about humans it's racist, but if we talk about squids, we can't do anything... am I wrong DynamicSquid? @ike_fite

firefish (915)

@RohilPatel Eh... yes wrong. If you discriminate it means that you say someone is inferior to you because they are a different ethnicity.

WARNING! THE FOLLOWING TEXT IS FOR ILLUSTRATIVE PURPOSES ONLY, I DO NOT INTEND ANYTHING I SAY IN THE FOLLOWING SECTION TO OFFEND ANYONE

If you were to say "He's chinese" (presuming you aren't yourself), then that won't be, that is merely stating facts.
If you say "He's dumb BECAUSE he's chinese" that WOULD be racist.

END OF SECTION OF DISBELIEF

RohilPatel (1535)

Nice! Show ur appreciation by upvoting! Thanks! @zhaq6129

AnthonyFerr (14)

I threw together a similar thing in python a while back so that I can skip the manual math. https://repl.it/@AnthonyFerr/Stats#main.py

johndo3 (20)

My math teacher is the nicest tho

channin (6)

This will fix the issue of the numbers deleting when you add a new box. You will need to replace it with the existing addField click listener.

addField.addEventListener('click', e => {
  // create new elements to add the new input
  var input = document.createElement("input");
  var spacer = document.createTextNode(", ")
  input.type = "number";
  input.className = "number-input"
  // append to div
  inputContainer.appendChild(spacer)
  inputContainer.appendChild(input)
});
RohilPatel (1535)

ok its dun!!! thanks so much! is it good? @ChanningBabb1

gwynethwingell (55)

cool,no words my teacher is mean thanks will help me alot.

RohilPatel (1535)

Yeah, I just wanted to have a weird title. This could be a nice tool to use. Is there anything you wish existed? @gwynethwingell

zhaq6129 (50)

@RohilPatel I wish there was a repl version of Club Penguin but we could call it Club Repl or something and use different animals. I could design some graphics if we wanna make this a real thing. Im not good at coding tho.

MemeManHimself (100)

@zhaq6129 Lollll that would be so ebic

[deleted]

u know wuts funny ur on the leader board and it says u have 19 cycles and u exactly have 1382 cycles

IndyRishi (150)

@DynamicSquid What is your favorite squid? Mine is the collosal squid. Please reply. Thank you!

RoyalCoder1234 (35)

Love the code. Just love it!

[deleted]

YEET! This is awesome!

tussiez (1532)

Cool! An easier way to add numbers to the array is to use a text field, and split the commas using txt.value.split(',')

RohilPatel (1535)

I guess I could! Maybe for a second generation! @tussiez

ComputingSquid (53)

how did you calculate the average
I had SOO MUCH trouble trying to do that
@RohilPatel

RohilPatel (1535)

Well it was the easiest for me lol. U need to put all items in an array and get the total of it. Then u just divide, easy. Check my code for it @ComputingSquid

ComputingSquid (53)

wait no, i was trying to find the standard deviation and then you had some really complicated function. It was nott th average @RohilPatel

RohilPatel (1535)

@ComputingSquid it's still pretty easy, thinking how you might do it could help

firefish (915)

Well, luckily my maths teacher ain't mean (i don't mean to brag but, really none of them are)

RohilPatel (1535)

Same here, but if they are nice they will know the joke ;) @firefish

firefish (915)

@zhaq6129 er. what does your teacher do then

zhaq6129 (50)

@firefish i was tryna say that ur lucky that ur math teacher is nice

firefish (915)

@zhaq6129 well how are they mean?

zhaq6129 (50)

@firefish if you dont respond to the question within 1 second he takes 50 percent off ur daily grade

firefish (915)

@zhaq6129 I'd hate to be you, because having that outs you under stress, I won't be surprised if everybody in your class had an F by now

zhaq6129 (50)

@firefish yo we got a substitute today yay

zhaq6129 (50)

@firefish plot twist sadly, he scanned the documents upside down and is probably still gonna count it as my fault. :(

zhaq6129 (50)

@MemeManHimself its not but knowing him he would still take points off