Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Python script that prints some information provided by a user. Background In addition to information about type conversions in Lecture 6, you will
Write a Python script that prints some information provided by a user. Background In addition to information about type conversions in Lecture 6, you will need to know about Python's input() function to complete this assignment. input() can be used to ask the user a question; the function call evaluates to whatever the user responds with. For example, calling input('Enter your name: ') will prompt the user to enter their name; the result of this function call will be whatever name the user typed in. This example is shown below: >>> input('Enter your name:') Enter your name: Jon 'Jon Objective Your goal for this assignment is to write a Python script that will: prompt the user for their name prompt the user for their age print a string telling the user how old they will be on this date in 2030 For example, if I enter the name Jonathan and the age 37, the script should print exactly the following string: Jonathan will be 46 in 2030. Procedure 1. As always, start by asking yourself, how would I solve this problem by hand? Work through a couple of examples on paper and note the way in which you solve the problem. 2. Write some pseudocode to describe the steps that are required to prompt the user for input, store information and perform any necessary calculations. 3. Convert your pseudocode into a Python script. Choose helpful, descriptive variable names and use comments to explain any unintuitive parts to your peers (who will be reviewing your assignment). Do not include your name or student number in your script. 4. Finally, submit the result as a file called assign2.py to Gradescope for functional evaluation
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