Skip to content

den01-python-programming/exercise-1-9-story

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercise 1.9 - Story

Write a program that asks the user for a character's name and their job. The program then prints a short story.

The output must be as shown below -- note, the name and job depend on the user's input.

I will tell you a story, but I need some information first.
What is the main character called?
*Bob*
What is their job?
*a builder*
Here is the story:
Once upon a time there was Bob, who was a builder.
On the way to work, Bob reflected on life.
Perhaps Bob will not be a builder forever.

The exercise template comes with a program template that includes the function and its call.

def story():
    # Write your code here
    
story()

Here's another example output:

I will tell you a story, but I need some information first.
What is the main character called?
*Ada*
What is their job?
*a Data scientist*
Here is the story:
Once upon a time there was Ada, who was a Data scientist.
On the way to work, Ada reflected on life.
Perhaps Ada will not be a Data scientist forever.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages