Skip to content
Sign UpLog In
Profile icon

brogen

@brogen
Channel your inner porpoise.
  • pattern print

    Cover page
    Made with Python

    print patterns

    Recent comments (0)
Repls
Community
brogen
brogen
shared a Post
2 years ago
Can you help me with some problems?
I am working on a text adventure and when I put in one number all of the things that would happen when it is put in are called at once. (;'⌒') Will yo
brogen
brogen
I have the problem resolved.2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
You have too many if statements. Try elifs too. And indent everything. IT seems you are not indenting everything properly.2 years ago
Coder100
Coder100
Make sure you have indented everything correctly.2 years ago
brogen
brogen
shared a Post
2 years ago
I want to try to play a sound but I don't know how.
GABELACANLALE
GABELACANLALE
Very good question. from replit import audio audio.playfile('myfile.mp3')2 years ago
brogen
brogen
This question will remain unsolved. ;(2 years ago
brogen
brogen
My teacher looked and there's no way to do it. 2 years ago
brogen
brogen
shared a Post
2 years ago
I want to make a eating contest you can enter in and I need to know how to do chance statements. 🐷🐖🐽 Pigs are the best! You can play the game now
Pig Farm
Python
DynamicSquid
DynamicSquid
You can use a random number generator for that import random num = random() # generate random decimal between 0 and 1 if num < 0.5: do something else: do something `2 years ago
brogen
brogen
shared a Post
2 years ago
This is a game where you would train up dogs and sell them. However after you train once you can't train again. Please help me find out why.
The Dog Game
Python
Bookie0
Bookie0
Hi, I think the reason why is because you're asking if they want to train or sell in the if loop with the training. A code where you can always train your dog would look a bit like this:, using functions: def train(): # defining the train function print("Rolling over") print("playing with toy") etc. put all the other code for the training here while True: # infinity loop to always go on and on menu = input("What do you want to do? train - 50 or sell?") if menu == "train" and money 2 years ago
realTronsi
realTronsi
You have two main functions?!2 years ago
brogen
brogen
shared a Post
2 years ago
Help me debug this plz. please help.
9 A
Python
Coder100
Coder100
ok, on line 40, why do you have two arguments when it takes 0? habachi.describerestaurant(name, dishtype) Correct code habachi.describe_restaurant() ig you overthought it lol2 years ago
littlepenguin
littlepenguin
You did not define name yet. If you define it, it will work.2 years ago
brogen
brogen
shared a Post
2 years ago
I want to be able to do something every set amount of time. like every second get one dollar from your buisiness.
The Dog Game
Python
Coder100
Coder100
sure, try something like this: import time while True: print("Time is ten seconds.") time.sleep(10) Do note that means any code after it won't get executed import time while True: print("Time is ten seconds.") time.sleep(10) print("I never happen") `2 years ago
Whacko
Whacko
while True: dollars += 1 time.sleep(1) There. *Remember, you need time imported.2 years ago
brogen
brogen
shared a Post
2 years ago
I want to try and use the data base for a project to have a password set up and you can input the password and that password is asighned to you foreve
8 E
Python
Coder100
Coder100
Try something like: from replit import db input('sign up? (y/n): ') if signup == 'y': username = input('username: ') password = input('password: ') db[username] = password else: username = input('username: ') password = input('password: ') if (db[username] == password): print('welcome %s!' % username) `2 years ago
techde
techde
Fork this:https://repl.it/@templates/Django-Template#README.md2 years ago
techde
techde
Real has a starter template for it that I suggest you check out!2 years ago
brogen
brogen
shared a Post
3 years ago
How can I erase a symbol and replace it with a new one?
grocery list
Python
Summit
Summit
hmm, you could possibly clear the output window and then reprint everything again except with a new change3 years ago
brogen
brogen
I want to do this /-\| and repeat to make a loading symbol1!3 years ago
brogen
brogen
shared a Post
3 years ago
you see the stairs right? are they going left or right?
repeat print
Python
MauriceLam
MauriceLam
I saw a lot of curves...?3 years ago
brogen
brogen
shared a Post
3 years ago
happy holidays! If you like christmas upvote also you can comment down below and talk
christmas tree!
Python
Bookie0
Bookie0
dont wanna be a party pooper, but its not christmas3 years ago
brogen
brogen
Cool are you here because a class?3 years ago
brogen
brogen
i just threw this together with some time on my hands. I love christmas!!!3 years ago
brogen
brogen
shared a Post
3 years ago
it might not be to exilerating but t it's my first project. you may change the symbols in the printing to make different patterns.
repeat print
Python
brogen
brogen
ok thank you!3 years ago
DynamicSquid
DynamicSquid
Cool! You also don't need brackets: if i != "\n" and i != ":":3 years ago
brogen
brogen
shared a Post
3 years ago
i want to be able to print patters on something typed in. help! please.
pattern print
Python
brogen
brogen
i want to be able to print something when you type in a command for example.3 years ago
Ronnoc72
Ronnoc72
You can use a GUI, pygame is a fantastic way to visual see your code.3 years ago
PattanAhmed
PattanAhmed
@brogen Hi, Can you please explain a little bit more for our Clarification! Thanks!3 years ago
brogen
brogen
shared a Post
3 years ago
i need to go slowly instead of putting the whole thing on at once.
pattern print
Python
PattanAhmed
PattanAhmed
@brogen Hi, Here is the code you can try:- It will print Letter-by-Letter import time,sys def typewriter(message): for i in message: sys.stdout.write(i) sys.stdout.flush() if ((i != "\n") and (i != ":")): time.sleep(0.09) else: time.sleep(0.6) text = 'Letter-by-letter' typewriter(text) Thanks! Hope this helps3 years ago
Coder100
Coder100
Hi! Try this: import time def typewriter(text, delay=0.1): for letter in text: print(letter, end='', flush=True) time.sleep(delay) print() typewriter("I'm being typed at a rate of 0.1 seconds") typewriter("I'm being typed at a rate of 0.05 seconds", 0.05) `3 years ago
brogen
brogen
thank you3 years ago
brogen
brogen
shared a Post
3 years ago
how do i make infinite loops i need to know for a printing project!
pattern print
Python
PattanAhmed
PattanAhmed
@brogen Hi, Use something called While Loop:- Code:- while True: print('This will print infinite times') Thanks! Hope this helps3 years ago
brogen
brogen
can you tell me how to print slowly like typing instead of printing the whole thing really fast3 years ago
Coder100
Coder100
You can use a while loop for that: while True: print("hi!") read more here Also, btw use break to end the loop3 years ago