Zaine Rehman
@RhinoRunner
average C++ user
0
better rng for c++A class for better, less predictable/repeatable RNG.
Different values can be put into the function to prioritize performance at the cost of more predictable RNG.
1
0
0
0
cos(90) in degrees is not returning 0
I'm trying to make a trig solver, and right now I wanted to make the basic functions, like typing in sin(25) or tan(45) and having it return the value.
Heres the current code for it:
#this is in the "trig" class
def formatInput(self,inp:list):
comp = ""
num = 0
for i in inp:
try: comp += str(float(i))
except: pass
for x in self.funcs:
if x in i:
a = i.replace(')'," ").replace("("," ").split()
the next line uses the given function, i think this is where the problem is
comp += str(self.funcsa[0])))))
continue
if i in self.op: comp += str(i)
if i == "e": comp += str(math.e)
if i == "pi": comp += str(math.pi)
if i == "tau": comp += str(math.tau)
num += 1
return comp
while True:
comp = trig.formatInput(input('> ').split())
print(eval(comp))
So when I type in cos(90), it should return the answer (in degrees), which would be 0, but for some reason it returns -0.2995153947555356 instead
Any ideas?
Edit:
Upon running input(math.degrees(math.cos(90))), I get -25.67272711536642, so now I'm really confused because me typing in cos(90) gives a different answer5
1
0
0
What happened to the old repl talk format?
It seems as if the old repl talk posts have been turned into apps.
This is horrendous. Also I'm confused as to why I need to share a repl for Ask. (the repl linked to this post has nothing to do with this post, I'm simply just confused)
What happened to the old format? Why was it replaced?MrVoo @RhinoRunner Yeaaah it's pretty weird, you can complain about it here: https://replit.com/@replit/Repl-Talk-Redesign?v=11 year ago
InvisibleOne @RhinoRunner Replit decided that Apps was better I think to stop people from cycle farming. They also made it so you can't see how many cycles someone has unless you go to there profile or hover over them, and they removed the leaderboard as far as I can tell.
I really don't care about that stuff but I am quite annoyed with apps. Things stay trending for way too long and it's almost impossible to get your project up there because once something has like twenty thousand runs it just sits there forever.
They also changed tutorials up so it's hard to find community tutorials and they limit your posts to 5000 characters. So unless you write out your tutorial in a README file and include it in a repl you can't even make a good one. 1 year ago
5
3
0
0
Discriminant solver
Use to solve for the discriminant of the quadratic formula.
Enter the a, b, and c values and press enter after each prompt. Also, press enter after the answer to go again.
only one line :)9
1
0
0
Labyrinth 3
The 3rd game in the Labyrinth series I've been making. I decided to make a 3rd game because I don't like the code for the 2nd or 1st one.
Differences from the 2nd game:
A game timer
Fixed lag issues
More levels
The rules will be explained when you press run. The number keys will change your character's color, pressing 0 (yellow highlight) will kind of bug the player out.
Let me know if you want me to add anything or if there are any problems with it.24
1
0
I made a dictionary that holds data for a dnd character. Maybe someone else wants a template, so I'm posting it here.
Tell me if I'm missing anything
Python
txasdev An error occurred while running the program. 🤔
File "main.py", line 25
"Animal Handling"; 0,
^
SyntaxError: invalid syntax2 years ago
4
Anger runread the post for a full explanation on how to play
https://replit.com/talk/share/Anger-Run/140573
224
4
4
0
Python Advanced CalculatorRead the README.md file for how to use.
124
8
0
0
MOAR MEMESMore memes as a sequel to my other meme repl
76
8
0
2
memes!Just a bit o memes.
45
2
2
When you press enter it will generate a random sentence!
examples:
image
image
image
image
have fun
Python
Bunnytoes great job.
> while I was at my house, I took over a lava bucket names Alexandria2 years ago
17
The Helicopter GameJust a cool little game I made back in October 2020.
Click the screen to start the game. Use the arrow keys to move. Try to beat all 3 levels!
Use this link!!!
https://replit.com/@RhinoRunner/The-Helicopter-Game?lite=1&outputonly=1
702
33
17
JamesMiller16 Can you give me the moving part of the code im to lazy to find it or code it my email is [email protected]2 years ago
I am trying to get mouse input in python, so I tried the pynput module to test it out.
This is what happened.
Traceback (most recent call last):
Fil
SixBeeps Mouse input in the terminal? That doesn't exist. Terminals have never had that kind of capability, in or out of Replit.
If you want to use the mouse, you'll have to set up the X11 VNC. Usually I've been able to do this with the polygott-x11-vnc command, but it appears to not be working now.2 years ago
firefish I think I know what's happened: the X server (which is the graphics server that repl.it and most linux machines use) doesn't seem to be set up properly. Try opening a different kind of python repl, preferably something with graphics support, like Python with Tkinter. click here to create a repl
Note: this is Python 3.6, not the latest 3.9.2 years ago
InvisibleOne It needs to be made in a repl with an Xserver, try doing it in pygame, tinker, or turtle I think.2 years ago
Have you ever wondered how long you would have survived in a zombie apocalypse? Well now you don't have to wonder!
Take this 10-question quiz to find
Python
mcro A zombie apocalypse would only last about 2 days because of the sun burning them and maggots eating them.2 years ago
2
Labyrinth 2Use the arrow keys/wasd to move around
Collect coins
Don't touch glitch orbs
Don't go inside of clams
Get to the door to go to the next level
233
5
2
I found a bit of code that gives you your public IP address, and for some reason when I run it on replit.com, it gives me an IP that is not mine (172.
19ecal That's presumably the IP of the particular replit server that the repl is running on. If you run that on your local machine it should (?) give you your IP address (?).
I don't really know that was a bit of a guess tbh2 years ago
IntellectualGuy I don't think you're allowed to do that anyways, you can get banned because of it2 years ago
I want to know how to put a picture on the tab for my website I'm making with Flask.
For example, replit.com has this as their image:
yeetTheBaby
I've
I don't have discord, but my friend gave me the server address for the repl.it Minecraft server. When I try to join it, it says:
Failed to connect to