Name_________________________________ 01.
05 String Input
This assignment has three parts.
Part One: Write a program to simulate a chatbot conversation. Use the following guidelines to write your
program:
1. Decide on an interactive conversation 4. At least once, use the indexing or slicing
someone could have with a computer. technique.
2. Your program should include at least 5. Use concatenation to join string literals
three interactive prompts. and string values.
3. Input from the user should be assigned 6. Write the pseudocode for this program.
to variables and used throughout the Be sure to include any input and output
conversation. needed.
Insert your pseudocode here:
Input:
Comment: Name, Date, Description
Def main()
User inputs his or her name
User inputs his or her age
User inputs his or her country of residence
Part Two: Code the program. Use the following guidelines to code your program.
1. Code the program using Python IDLE. 3. Use meaningful names for all variables.
2. Using comments, type a heading that 4. Follow the Python style conventions
includes your name, today’s date, and a regarding indentation and the use of
short description of the program. white space in your program.
Example of expected output: The output for your program should resemble the following screen shot.
Your specific results will vary depending on the choices you make about the conversation and the input
provided.
Insert a copy of your code from the IDLE here:
# Name: Daniel Romanov
# Date: 9/22/20
# Description: to have an interactive conversation with user
def main():
userName = input(“What is your name?”)
userAge = input(“What is your age?”)
userCountry = input(“In which country do you live in?”)
print(“Hi! My name is ” + userName + “. What is your’s?”)
print(“My name is Moby, and I am 14 years old. How old are you?”)
print(“I am ” + userAge + “. Where are you from?”)
print(“I am from the U.S.A. How about you?”)
print(“I am from ” + userCountry + “.”)
print(“I have to go. It was nice talking to you!”)
main()
Part Three: Complete the Post Mortem Review (PMR). Write thoughtful two to three sentence responses
to all the questions in the PMR chart.
Review Question Response
What was the purpose of your
program?
How could your program be useful in
the real world?
What is a problem you ran into, and
how did you fix it?
Describe one thing you would do
differently the next time you write a
program.