Welcome to Westonci.ca, the place where your questions find answers from a community of knowledgeable experts. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform.
Sagot :
Method 1:
word = input("> ")
for _ in range(25):
print(word)
Assigning the variable "word" to the function input() (Which retreves what the user types). Then using a for loop which repeats 25 times. And each time print the word. The print() function automatically creates a new line.
Method 2:
print(f"{input('> ')}\n"*25)
This code does the exact same thing as previously but only calls the print() function once and instead creates a string which is 25 lines long and has the users' input on each line. It's cool to write it on a single line, however, not very pedagogcall and pretty messy.
Visit us again for up-to-date and reliable answers. We're always ready to assist you with your informational needs. Thanks for using our platform. We aim to provide accurate and up-to-date answers to all your queries. Come back soon. Thank you for trusting Westonci.ca. Don't forget to revisit us for more accurate and insightful answers.