Tasks
Task 1: Logical Operators
Use logical operators to determine if a number is within a specified range.
1. Write code to check if the variable number is between start and end (inclusive). Print
True if it is, and False otherwise.
Task 2: Logical AND, OR, NOT
Use logical operators to check multiple conditions.
1. Write code to determine if a person is eligible for a discount based on their age and
whether they have_coupon. A person is eligible if they are either under 18 or over 65, or
if they have a coupon. Print True if they are eligible, and False otherwise.
Task 3: String Concatenation
Combine strings to form a complete sentence.
1. Write code to create a greeting message using the variable name. The greeting should be
in the format: "Hello, Name!".
Task 4: String Slicing
Extract specific parts of a string.
1. Write code to get the initials of a person using the variable full_name. The initials
should be the first letter of the first name and the first letter of the last name.
Task 5: String Formatting
Format strings using different methods.
1. Write code to create a sentence using the variables name and age. The sentence should be
in the format: "Name is Age years old."