String location_input is read from input. String my_str contains special characters. Modify my_str so the program outputs "Let's meet at Aya's favorite" followed by location_input. Ex: If the input is "park", then the output is: Let's meet at Aya's favorite park
Added by Melissa S.
Step 1
This can be done using a function like `input()` in Python. Show more…
Show all steps
Your feedback will help us improve your experience
Supreeta N and 71 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
Write a program that accepts input from the user and creates another string that contains either a u, l, or - for each character of the original string. Use 'u' when the character is uppercase, and use 'l' when the character is lowercase. If the character is neither uppercase nor lowercase, use '-'. Print the original string first, then print the modified string. #include <iostream> using namespace std; int main(int argc, char** argv) { string original = (argv[1]); string modified; char ch; // add code below this line // add code above this line return 0; }
Akash M.
Write a program that asks the user to enter a string. The program should create a new string called new_string from the user's string such that the second character is changed to an asterisk and three exclamation points are attached to the end of the string. Finally, print new_string. Typical output is shown below: Enter your string: Qbert Q*ert!!!
Liam H.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD