Computer 1st Puc
Computer 1st Puc
Active Digital Footprint: Data intentionally shared, such as social media posts or
online forms.
Passive Digital Footprint: Data collected without user awareness, such as cookies
or browsing history.
Be punctual.
Adjustable screens and chairs minimize strain on the eyes and body.
---
Strings Questions
string = "hello"
print(string[0]) # Output: h
print(string[-1]) # Output: o
2. Discuss to which data type a string belongs. Explain with a proper example.
Strings belong to the sequence data type. They are immutable. Example:
string = "hello"
print(type(string)) # Output: <class 'str'>
Example:
string = "hello"
print("he" in string) # Output: True
string = "hello"
print(string[1:4]) # Output: ell
"hi" * 3 → "hihihi"