Las Agna
@NarwhalFanatic
print("I see lasagna in your future.")
Ok so i have started using discord and made this bot a while ago, and it worked fine but now when i try to run it it gives me an error with the first
Python
Coder100 Alright, for future people, https://docs.repl.it/repls/secret-keys
basically, create a .env file (exactly that, cannot be token.env, anything.env only .env):
KEY=VALUE
No spaces
`3 years ago
Hello! I am trying to create some sort of GUI and wanted to create a popup for testing purposes but for the first time stack-overflow isn't helping. I
Python
SixBeeps There are many kinds of popups. Some of them open in a new window, some of them pop up from the bottom of the screen (called "Toast" popups). What kind of popup are you going for?3 years ago
A suuuuper simple wack-a-O game!
Literally just click the O.
-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This was made using the Python Play library!
Python
NarwhalFanatic For the time being hard mode does not pick and please dont leave angry comments about it I am working on it3 years ago
OK so I have seen this slow print system in many repl's but have never actually understood how it works (how syntaxes such as sys.stdout.write(c) work
AtticusKuhn As a tip when writing markdown, you can color based on the language, such as
import sys
def slow(text, endl="\n"):
for c in text:
sys.stdout.write(c)
sys.stdout.flush()
time.sleep(0.07)
print(endl, end="")
slow("Welcome to The Riddle.")
Also to answer your question stdout is the output of the program, and stdout.flush flushes the buffer to the terminal.3 years ago
NarwhalFanatic Specifically how do these syntaxes work.
sys.stdout.write(c)
sys.stdout.flush()
print(endl, end="")3 years ago
This is a simple lottery system.
-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-
If you have an suggestions, please tell me!
-=-=-=-=-=-=-=-=--=-=-=---=-=-
Python
This is just a very simple and crude lottery system that I made.
How it works
This system just uses a random number generator to generate 6 integers
Python
I am new to repl.it and learning python but one thing has always been in my head, how do you color text? I wanted to use it to color the score bar and
Python
SixBeeps Slap this buddy boy at the top of your program:
from colorama import Fore, Back, Style, init
init()
Then, you can do something like this:
print(Fore.RED + 'some red text')
print(Back.GREEN + 'and with a green background')
print(Style.DIM + 'and in dim text')
print(Style.RESET_ALL)
print('back to normal now')
`3 years ago
I was learning about python dictionaries and decided to program this.
P.S. I probably will read comments a while after they are posted
Python