Share your repls and programming experiences

← Back to all posts
DA ULTIMATE FOOD RATER
Bookie0 (1550)

This is a food rater. You are presented with some food (not always the same) and you have to rate it. That’s all. Pretty simple

Thanks for commenting and tips.
And remember, upvoting is caring! 😊 😃
Edit: thanks for the 13 upvotes!

Commentshotnewtop
athut (7)

I like how you said "It is now 7:23 AM breakfast."

KobeFF (307)

Cool! you should make the rating on a scale of 1 to 10 instead of 1 to 5.

Bookie0 (1550)

Hey @KobeFF , thanks for commenting. I wanted a scale of 1 to 5 because it kind of relates to the 5 stars ⭐️ on hotel rating and food rating and stuff like that. But thanks for your suggesting !

Than,s!

KobeFF (307)

@Bookie0 Oh, I see what you did there :)

Bookie0 (1550)

Thanks for understanding ! 😀😃😄@KobeFF

adityaru (142)

Nice! But consider making

  for x in line_something:
    print(x, end='')
    sys.stdout.flush()
    sleep(0.1)

in to a function (which would look like):

def slow_print(line):
  for letter in line:
    print(x, end='')
    sys.stdout.flush()
    sleep(0.1)

Other than that, good job!

Bookie0 (1550)

Hey, thanks for the feedback @adityaru
I dont really understand what you mean by replacing the for statement into a function. Does it make the text ‘type’ slower (slow_print), or is it just to make me not have to keep repeating it over and over again?

Thank you so much!!!!

NoelBryan (249)

It’s to make you not have to repeat it so much. @Bookie0

Bookie0 (1550)

hello, thank you so much for your answer!, im gonna use this advice on my future repls!!
thank so much again and have a great [email protected]

Description (3)

@adityaru does this do the same thing?
def display(text):
for c in text:
print (c, end="")
time.sleep(.07)

adityaru (142)

@Bookie0 It is called the DRY (don't repeat yourself) principle of programming.

DannyIsCoding (405)

I love it, but add more times(like lunch and dinner) to appear random. And a play again.
Still a great Code 👍

Bookie0 (1550)

Hi, thanks for commenting! Yeah there is times lunch and dinner, it’s a random between breakfast, lunch and dinner. But maybe I might just put all the different modes.
I’m still working on the play again, thank you very [email protected]

DannyIsCoding (405)

@Bookie0 oh. Ok! Thanks for letting me know. I played like 4 times and got only breakfast, lol

Bookie0 (1550)

Oh must be chance! Lol
Feel free to try again and maybe you’ll get lunch or dinner.
If you want, ill notify you when i improve this version!!
Have a great [email protected]

Bookie0 (1550)

hi, would you please like to visit this cool repl i just made?
thanks so [email protected]

https://repl.it/talk/share/Da-ULTIMATE-LOVE-Calculator/34866