Given the following code def simpleCommands(string, index): print(len(string)) print(string[index]) val = input("Enter a name: ") simpleCommands(val, 2) Give an input that will produce the following output: 3 a Enter a name: type your answer...
Added by Ross M.
Close
Step 1
We want the output to have "Enter a name:" followed by the desired output. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 84 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
Ask the user to enter a name and the length of the box Then display the name in the box exactly like the following example For example: Input Result frog Enter a name: frog 15 Enter the length of the box: 15 Display the name in a box: -frog
Supreeta N.
Liam H.
using python: Use input to prompt user's name in first last format Print the user's name in last, first format Tests Input Output Regina Spector Spector, Regina Chris Smith Smith, Chris
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD