Skip to main content
100%

quick input script

✓ Published0🌍 Public
Aandyreagan
Last edited Apr 27, 2015
Created on Apr 27, 2015

This example shows an interactive command-line script that lets a user assign scores to a list of tweets, with the ability to step backward by entering 'b' to revisit a previous tweet. It uses Python's built-in `input()` function to prompt for each score and stores the results in a list named `scores`. The script relies on a `while` loop to iterate through the `tweets` list, decrementing the index when 'b' is entered and incrementing otherwise. Finally, it prints the collected scores. The data source is a hardcoded list of tweet strings.

AI-generated description

Similar vizzes