TYLER BYRD
@ThatOneGuy1234
I made a simple calculator a while ago where you would have 2 numbers and all the basic operators and it would add them together. I wanted to be able
Python
Wumi4 Hi!
You miss the necessary parenthesis (()) at the end of the Calculator function calling in Python!
To call the function, place a pair of parenthesis of every single time you call it.
Calculator()
`2 years ago
InvisibleOne In python, there is a better way:
print(eval(input()))
I think your issue is on line 33, you didn't activate the function. Instead of just putting Calculator You should put Calculator() You need the parenthesis when calling a function2 years ago
Thanks for the suggestion @Coder100
I made a coin flip for random results. I've got both heads and tails if it outputs one result for a while.
Python
I've already made a calculator and am working on a pretty big console-based game, so what else is there to do right now that you would suggest?
Say, How would I change the size of the text in python. I know how to change the color of text, is it a similar way of putting a code at the beginning
Coder100 Nope it's not possible because it's not practical, and very few programs would utilize it, use ASCII art instead. Colors used to be unstandardized--did you know that? And they still are today :(
The escape code could be \x1b, \033, or even \e!
Anyways, enough colors, use ascii art, it's cooler, and all programs use it!
https://fsymbols.com2 years ago
Kai_Justice Sadly there's no way to change the text size, bolding text is the only way to make the text larger.2 years ago
Starting at line 19 and below the code just won't execute and it's not giving me any error messages.
Python
CoolJames1610 Line 19
action = random.randint(1,5)
This will set action to a random integer between 1 and 5
Line 20
if action == 1:
So, if action is equal to 1, any code underneath it will run.
However, you have not coded what happens if action is equal to 2 or 3 or 4 or 5, which means if action is equal to any of these, the program will just stop.
Hope this helped :)2 years ago
OlauPla If you have your answer plz, click the tick. If you don't understand it reply to my comments, i will explain with more detail!2 years ago
I'm trying to make a console based game in python, but I want to clear the text that has accumulated in the console. Is there a certain command for th
I don't know f I'm doing something wrong here, but I'm trying to make a simple calculator with the four main operators. Is there a certain way I have
Python
techde Lol, the code looked different when i was answering it looked liek this:
num1 = input("What is your first number? ")
num2 = input("What is your second number? ")
op = input("What operator")
if op == +
answer = num1 + num2
print(answer)
so that's why I answered like that.2 years ago
What would be a good language to make games on using Repl? I want to learn C# for when I get unity, but all there is is a console that puts out text.
EpicGamer007 You could try scripting for Roblox in lua if you are interested.
All you need isa PC then download the PC version of Roblox which I think comes with roblox studio. You can then code stuff with roblox studio and publish to roblox.
Though that would not be on replit it would be a cool way to go. There are many tutorials to help you get started and it is really simple.2 years ago
DynamicSquid Repl.it is only for console text based games, simple graphic games with Python, and web games using JS. To make an actual game using C#, try downloading Unity and following it's tutorials on Unity's website2 years ago