Share your repls and programming experiences

← Back to all posts
My First repl
cpiechocki (127)

This is my first repl. My brother helped me code this. I hope you like it. Upvote if you enjoy. Also i saw some comments (@HENRYMARTIN4) so here @HENRYMARTIN4 is awesome. Also my brother just told me how upvoting works.

THANKS FOR ALL THE UPVOTES

Commentshotnewtop
kbadrinath_tcsp (6)

just add spaces and overall refining to the text, otherwise nice first program

nN34398Ff (77)

you should add something like if hi > 7: print("Too high") and if hi < 7: print("Too low")

cpiechocki (127)

@nN34398Ff K i will considr it. Wait nvm

gameplayrawesom (126)

@nN34398Ff I think he tried it and got an error. Well so much for not giving up.

Zuhdi28 (0)

@nN34398Ff and if we answer incorrectly
reveal the answer
or give us another try.

nN34398Ff (77)

@gameplayrawesom He has almost as many cycles as you man

gameplayrawesom (126)

@nN34398Ff LOL. He makes 1 repl and gets 101. I cant believe this got more than space invaders!!

JosiahKnisely (26)

LOL, @gameplayrawesom, it's because he's 7 yrs. old.

gameplayrawesom (126)

@JosiahKnisely Yup that is probably why :facepalm

JosiahKnisely (26)

WAIT, IF I PRETEND THAT I'M 3 YRS. OLD I WILL GET 1,000,000 UPVOTES! #GeniusMoment

JosiahKnisely (26)

@PowerCoder :P Why do you get emoticons when I don't.

JosiahKnisely (26)

Oops, I meant emojis.

PowerCoder (231)

@JosiahKnisely win+. (if you have a windows computer).

LizFoster (157)

@JosiahKnisely HeY gUyS mY nAmE iS yOuNg ChIlD kId AnD i Am OnE yEaR oLd

JosiahKnisely (26)

@LizFoster He get 100000000000 upvotes! He da best!

LizFoster (157)

@JosiahKnisely !!!!1!!!!!1!111!!!!!!!!!!!111!!

hooray

epicman702 (76)

Good luck with ur coding!
Remember, everyone was once like you

Nettakrim (318)

put a space after the guess my age

hi=input("guess my age ")

this way instead of it looking like

guess my age7

it looks like

guess my age 7

this just makes it look neater

NecroHacks (1)

Not bad! just make sure you refine your code so it doesn't look like: guess my age7.
Here are some ways:
Hi = input("Guess my age ")
or
Hi = input("Guess my age\n")
"\n" adds a new line

ShadedFlame (23)

@NecroHacks I always use "\n" Works great looks nice

ChristopherAndi (1)

I just put a space... lol looks fine to me that way
@JosiahKnisely

JackSt1 (0)

Keep it up man!

WyattWatkins (1)

NVM Ive been working at for an hour I just forgot the colon

Evanlicious (79)

Your boy be making upvotes out the printer! That aside, good work. My first program on Repl.it was a Python program that calculated stuff based on the sides of a polygon.

WyattWatkins (1)

Im trying to do the if hi == (X) but its not working

codeitfast (0)

You could print "guess my age", and then have an input underneath.

NarwhalFanatic (0)

Learned how to do if statements from this. Thanks!

chrisjacinto (0)

Great job on your first program! Hope you continue learning :)

PowerCoder (231)

I suggest doing something like this from line 5-9:

print("guess my age")
while True:
  if hi == ("7"):
    print("YOU ARE CORRECT!")
    break
  else:
    print("WRONG")

so that it'll loop

ernessola (0)

Welcome to Python!!!!

SimonDonckers1 (0)

Do you want to code sometime together my number is 0641358740

JosiahKnisely (26)

You should use /n after the guess my age. It looks more elegant and polished.

Zuhdi28 (0)

that is better...
from termcolor import cprint
cprint("Hello guys, this is my first repl...", 'yellow')
q = input("Guess my age\n")
if q == 7:
(tab)print("Correct!")

elif q == 8 or 6:
(tab)print("You are so close!")

nN34398Ff (77)

Oh gosh this has 64 upvotes oh man oh man
How???! Ha Ha, @cpiechocki has more upvotes than gameplayrawesome

KellerWorthen (13)

pretty good. You should try learning HTML

nN34398Ff (77)

is there a reason you picked the name cpiechokie?

Zuhdi28 (0)

you are good!
and for your age...
it is so good!

ShadedFlame (23)

Oh Wow 58 upvotes??? What!

rahulvrshny (0)

Nice start @cpiechocki. Keep up the good work!

lcsnickel (2)

Dude, this is nice 👌🏻

PhyllobatesLugu (0)

Good luck on your journey

CoulterStutz (0)

Add spaces at the end of the input so the output doesn't look like this
Guess my age7

CoulterStutz (0)

Try this fixed code
from termcolor import cprint
cprint("hello this is my first repl", 'yellow')

cprint("my brother's username is @gameplayrawesom", 'red')
hi = input("guess my age ")
if hi == ("7"):
print("YOU ARE CORRECT!")
else:
print(f'WRONG Im not {hi}')
cprint("My brother helped code this!", 'red')
cprint("this is the end of my repl", 'yellow')
-CoulterStutz

ChezCoder (204)

Very nicely done! I see that you are starting Python. If you need help with anything, you can always check the Python3 Documentation, and if you need help with modules/packages (in this case, you used the termcolor package) you can check Pypi.org. It's pretty useful! Good luck :)

nullified (7)

n=false
while not n:
try:
age = int(input("Guess my age\n"))
if age==7:
print("Correct!")
n=true
else:
print ("Wrong!")
n=true
except ValueError:
print ("enter a number!")