Page 135 - KEC Khaitan C8 Flipbook
P. 135

PROJECT NAME: Story Generator Program Using Lists

                 Software Used: Python Editor

                 Objective:

                 Develop a Python program to create creative stories by combining user inputs with predefined lists
                 of characters, settings, and actions. Use the random library and list operations to add dynamic
                 and engaging elements to the stories.
                 Platform:

                    ∑  PyCharm

                    ∑  Google Colab: https://colab.research.google.com/
                    ∑  Codeskulptor3: https://py3.codeskulptor.org/



                 Step-by-Step Instructions

                 Plan IPO Framework

                 Step  1   Input:

                             Initialize three static lists:

                              o  Characters: Names of the characters (e.g., Mia, Alex, John).

                              o  Settings: Names of the places (e.g., "on a misty mountain," "in a bustling city").
                              o  Actions: Tasks  or actions  (e.g., "discovered  an ancient  artifact,"  "saved  a  lost

                                 puppy").

                 Step  2   Process:
                             Use the random library to:

                              o  Select random elements from each list.

                              o  Combine the selected elements to generate at least three unique stories.

                             Optionally allow the user to input additional characters, settings, or actions.

                 Step  3   Output:
                             Display the generated stories in the following format




















                                                                                                 Hands-On Project  133
   130   131   132   133   134   135   136   137   138   139   140