- 2 Write A Program That Does The Following A Define A Variable And Set Its Value To Be Your Name As A String B Ask T 1 (21.71 KiB) Viewed 41 times
2. Write a program that does the following: a. Define a variable, and set its value to be your name as a string b. Ask t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
2. Write a program that does the following: a. Define a variable, and set its value to be your name as a string b. Ask t
2. Write a program that does the following: a. Define a variable, and set its value to be your name as a string b. Ask the user for their name, and store their answer in a variable. **Hint: Use input() to prompt the user for their name. C. Compare both of your names, and print out a message that indicates whose name comes first alphabetically. For example, the name 'Annie' would come before 'Terry' **Hint: You will need to use one of our six comparison operators: < >, <