Course Content
Introduction to Python
Introduction to Python
3. Conditional Statements
Boolean Data TypeChallenge: Comparison OperatorsCombining ConditionsChallenge: Logical OperatorsMembership Operators and Types ComparisonSimple if/else ExpressionsChallenge: Grocery StoreChallenge: Odd and Evenif/elif/else ExpressionsChallenge: Grocery Store ExtendedChallenge: Positive, Negative or Zero
Challenge
Task![test](https://cdn.codefinity.com/master/6666c0ee60047a4c86f55a5e1067c62f4e3e31d8/_next/static/media/swipe.5f9d7ff8.svg?w=48&q=75)
Swipe to show code editor
You're given the string "This is string for learning" stored in the variable test_str
. Your tasks are to:
- Retrieve and display the first character of the
test_str
(using the firstprint()
function). - Retrieve and display the last character of the
test_str
(using the secondprint()
function). - Retrieve and display the word
string
from thetest_str
variable.
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 11
Challenge
Task![test](https://cdn.codefinity.com/master/6666c0ee60047a4c86f55a5e1067c62f4e3e31d8/_next/static/media/swipe.5f9d7ff8.svg?w=48&q=75)
Swipe to show code editor
You're given the string "This is string for learning" stored in the variable test_str
. Your tasks are to:
- Retrieve and display the first character of the
test_str
(using the firstprint()
function). - Retrieve and display the last character of the
test_str
(using the secondprint()
function). - Retrieve and display the word
string
from thetest_str
variable.
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 11