Lab Exercises 2.3

  1. What are variables, and what role do they play in programming?
  2. Explain the difference between integers and floats in Python. Give an example of each.
  3. What are strings, and how are they commonly used in programming? Provide an example of a string.
  4. What is string concatenation, and how can it be achieved in Python?
  5. How can you access individual characters within a string using indexing? Give an example.
  6. How does string slicing work in Python? Provide an example of slicing a string.
  7. Explain the concept of string formatting and provide two methods to format strings in Python.
  8. List three commonly used string methods in Python and briefly explain their purposes.
  9. What is the boolean data type in Python, and what are its possible ...

Get Python Made Easy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.