Question
PA 1. Hello! Topics Input Output Instructions Objective: practicing with input and output statements and string concatenation and formatting Description In this assignment you will
PA 1. Hello!
Topics
Input
Output
Instructions
Objective: practicing with input and output statements and string concatenation and formatting
Description
In this assignment you will write a simple program hello.py, which is a variation of the Hello World! classical program. Your program will ask the user to answer questions about the users name, age and favorite movie. Here are the snippets of the program output. To get the full credit, your program output should match the following format exactly; however, empty extra lines should not matter.
The program starts with the following prompts:
Hello! What is your name?
What is your age?
What is your favorite movie?
After the user answered all questions, the program produces the following output:
Nice to meet you, username.
You are age years old and your favorite movie is favorite_movie.
Here, username, age and favorite_movie should be substituted to the actual values entered by the user. For example, if the user enters Alice, 18, and Superman, the output of the program should look like this (lines in red are not printed by the program - they are entered by the user!!!):
Hello! What is your name?
Alice
What is your age?
18
What is your favorite movie?
Superman
Nice to meet you, Alice.
You are 18 years old and your favorite movie is Superman.
Programming Approaches
In the beginning of every program you should write a header, a comment block that contains information about the program, date of its creation, the author's name and descriptions of input and output of the program. The header should look like this:
# assignment: programming assignment 1 # author: (put your full name here) # date: (put the date you finished working on the program) # file: hello.py is a program that asks the user to enter user's name, # age, and favorite movie and outputs a greeting message that # include the information about the user # input: string data # output: string data
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started