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
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.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 11
Challenge
Task
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.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 11
Switch to desktop for real-world practiceContinue from where you are using one of the options below