Bookie0 (5078)

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!

You are viewing a single comment. View All
ARJPEG (150)

Nice! But consider making

  for x in line_something:
    print(x, end='')

in to a function (which would look like):

def slow_print(line):
  for letter in line:
    print(x, end='')

Other than that, good job!

Bookie0 (5078)

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!!!!

NoelB33 (326)

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

Bookie0 (5078)

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="")

ARJPEG (150)

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