Kars1996
@Imthebestthe
UK
I'm not sure if this is the right board to ask this (hopefully it is) But would anyone like to work on a small python project? It would be a lot of fu
Python
So, this is just some of the stuff that I am involved in. I haven't really been involved in the repl.it community recently so I just decided to do thi
Python
Hello! Firstly, this code is not mine. It is @bobthetomatopie 's code so thanks for that. Secondly, is there a way to make it so that you can do blue(
Python
BobTheTomatoPie This should do it, but the function is prolly not very usefull when you can just go print(blue + 'hello')
def blue(text):
print(blue + text)
also ppl have already told you this. I just saw i was pinged so i came over to answer as well2 years ago
RYANTADIPARTHI Solution
you just have to name your def. Try this.
def example():
return red + "example"
print(example())
like that. Just call it at the end, and use return.
That should work2 years ago
19wintersp To make the text a colour, you can print the code, then the text. The easiest way would be to just do:
print(blue + "Hello world!")
However, if you want a function, you could do:
def printBlue(message):
print(blue + message)
This defines the function printBlue, which does the same as the first code example.2 years ago
I was making a peice of work with some of my freinds and i was wondering how i could make a clear funcion. because i cant seem to find one that clears
Python
Bookie0 like this:
import os #importing os
def clear(): # putting it in a function so you can use it many times
os.system('clear') # clears console
to use it:
clear() # clears the console
Easy! :)2 years ago
RYANTADIPARTHI You don't need anything
Clear is already a function in python.
words = {'a', 'b', 'c'}
words.clear()
That will work2 years ago
Hey guys! its you boy, someone bad at python. its been a while so i dont really now why this is working.I was asked to make a piecee of code that woul
Python
Bookie0 Screen Shot 2020-10-09 at 8.28.55 AM
Hi!
Lines 6 and 7 you included a list containing different kinds of yes and no. However, on line 8 in the if statement, you did
if yesorno == yess:
but you probably want to do:
if yesorno in yess: # this checks if the input of the user is in the list
Screen Shot 2020-10-09 at 8.31.34 AM
same thing on line 17, change it from if yesorno == noo: to:
if yesorno in noo: # checks if user input is in the noo list
Lemme know if you need anymore help or if I was2 years ago
Wumi4 At the line when you work with yesorno, 2 lists and the ifs,
if yesorno == yess:
Other code here, I will not show it
Just replace the == with in, like this:
if yesorno in yess:
Other code
It should work.2 years ago
I have a small website I would like to make. Could you guy reply and show me some ways to make the buttons look good.
Edit: Feel free to edit the code
HTML, CSS, JS
I would like to know how many of you think that the imperial system is better. (hint: It's not😄). here is a flappy bird game I found. Also, shoutout
HTML, CSS, JS
ApoorvAgrawal The U.S. doesn't have the metric system because, this one country in europe sent this rich guy to the united states but that guy got intercepted by pirates so the u.s. never got to realize how good the metric system was, so we just stuck with imperial units3 years ago
AncientBison Metric uses normal stuff like 10 imperial use random numbers i like metric way better3 years ago
this code was originally meant to help me teach my little brother some simple maths, Then I added other stuff and it started to just be a fun mini-pro
CodingCactus hi, @ImtheBestthe There are a lot of errors in your code, so could be difficult to explain. I have fixed them all here (https://repl.it/@CodingCactus/teaching-my-little-bro) if you want to see what I have done. Any questions just ask.
Some issues were that you were using elifs with no statements, I have replaced them with elses. Also on your math questions (adds and times) The input needed to be an int for it to equal anser. Sometimes you got mixed up between your anser variables as well. Also,3 years ago
Imthebestthe before any of you guys start saying "you didn't write this code" all of it was form ME!!!!3 years ago
Recently I have been experiencing problems opening HTML file on repl. Is it a problem on my side or is this happening for more people? And yes, I did
Highwayman It doesn’t seem to happen to a lot of people, so I’m guessing it’s just a problem on your side. It happens to me too I think. It’s where the files/editor loads forever, but says it’s connected, right? Or is it just the run button loading and the console loading forever? Because if it’s the latter then, yes, it is your side.3 years ago
Moderates of repl.it, how did you guy become mods? I was wondering because I hope to be able to help in this diverse community of cool and interesting
HTML, CSS, JS
AphixDev Moderators actually work at replit. If you want to become one, contact replit directly3 years ago
how would I be able to define the different game modes and then when it would run the specific game mode. i realise i could just create two different
Python
hello ther... i cant do it. ANYway... how do you use the def function. i know how to define something, but how do you call it?
edit: go onto files and
Python
After realising that I am a complete noob when it comes to python coding, I wanted to know how you pros did it. How you guys link to file together and
Kwolski Example: so I am going to make two .py files. The first one will be named python.py and the second one python2.py and in the main I would put import python and it will run whatever code you put in the python.py and then in the main you could put import python2.py and it should run both files right after each other.3 years ago
Great. i was wondering if you could help me with a few things. i will make sure to read and try all of your responses(if there are any!).
can you make
Python
Foster_Bryant Ik how to do all those things but how would I add a point system for a game that doesn't even exist yet...3 years ago
AlexanderTarn you can make a file with username list, you then check if the username is in there and use information from that and put it into your code.
you can use readchar() to get an instant input of 1 letter, which you can use for a code like in nitrotype. Point system is easy, just have a variable and when you get the right thing just += 1 the variable.3 years ago