The program should output a sentence containing the user's name and age. An example of the program input and output is shown below: Enter your name: Alex Enter your age: 23 Alex is 23 years old.
Added by Jeffrey M.
Step 1
Ask the user to input their name. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 59 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
1. person_name = '' 2. person_age = 0 3. person_name = input('Enter person name: ') 4. person_age = int(input('Enter person age: ')) 5. print('In 5 years,', person_name, 'will be', person_age + 5)
Shelayah R.
In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold: What is your name? Amanda How old are you? 15 Hello Amanda! You were born in 2005. Write the program. Format your code using best practices. Refer to the zyBooks style guide, if needed, to use proper naming conventions for variables and methods. Use the most appropriate statements with minimal extraneous elements, steps, or procedures. Run the program. Debug the program. Be sure your code produces the correct results. Save and submit your file.
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD