scikit-learn Tutorials

scikit-learn offers a systematic approach to Python machine learning. Our tutorials cover various ML algorithms, model selection, and evaluation techniques, suitable for both beginner and intermediate data scientists. With free labs and practical code examples, you'll get hands - on experience in building ML models. Our data science playground enables you to experiment with scikit-learn functions and datasets in real - time.

Write a Simple Python Program

Write a Simple Python Program

In this lab, you will embark on your journey into Python programming by creating and running your very first program. You will gain hands-on experience using the VS Code editor within the LabEx environment to write and execute Python scripts. Building upon this foundation, you will further practice writing Python programs, focusing on utilizing the print() function to display output. The lab will then guide you through identifying and understanding common Python errors, equipping you with the knowledge to recognize and troubleshoot issues. Finally, you will learn practical debugging techniques to effectively resolve errors and ensure your Python programs function correctly.
Python
Use VS Code for Python Development

Use VS Code for Python Development

In this lab, you will learn how to use Visual Studio Code (VS Code) for Python development. We will explore the VS Code interface, practice using Python in interactive mode in the terminal, and create and run a Python script, solidifying your understanding of the development workflow.
Python
Work with Sets in Python

Work with Sets in Python

In this lab, you will gain hands-on experience working with sets in Python. Sets are powerful data structures for storing unique elements and performing efficient membership tests. You will learn how to create sets, add and remove elements, perform set operations, and use sets to remove duplicates from lists.
Python
Work with Strings in Python

Work with Strings in Python

In this lab, you will gain hands-on experience working with strings in Python, a fundamental data type. You will begin by understanding string basics, including creation, immutability, and accessing individual characters using both positive and negative indexing. Building upon this foundation, you will learn how to extract substrings using slicing, utilize various string operators and escape characters for manipulation and special formatting, and explore different methods for formatting strings. Finally, you will delve into common string methods to perform operations like searching, replacing, and modifying string content.
Python
Function Parameters in Python

Function Parameters in Python

In this lab, we will delve into the practical application of functions by exploring how to define and utilize functions with parameters in Python. Building upon our previous understanding of functions without parameters, we will learn how to make our functions more dynamic by accepting input. We will cover various aspects of function parameters, including defining functions with positional parameters, using default parameter values, passing arguments using keywords, handling a variable number of arguments, and exploring special parameter types. Through hands-on examples, you will gain a solid understanding of how to effectively use parameters to create flexible and reusable functions.
Python
Keywords and Built-in Identifiers in Python

Keywords and Built-in Identifiers in Python

In this lab, you will gain a fundamental understanding of Python's reserved words and pre-defined names. We will begin by identifying Python keywords, which are special words with specific meanings that cannot be used as regular identifiers. You will learn how to list these keywords using the built-in `keyword` module. Following that, we will explore Python's built-in identifiers, including functions, objects, exceptions, and constants, which are always available for use. Finally, you will learn the crucial practice of avoiding the use of both keywords and built-in identifiers as your own variable or function names to prevent naming conflicts and ensure your code functions correctly.
Python
Understand Class Features in Python

Understand Class Features in Python

In this lab, you will gain a practical understanding of key object-oriented programming concepts in Python. We will explore encapsulation by working with private attributes and learn how to control access to data within classes. Furthermore, you will implement inheritance to create relationships between classes, including practicing multiple inheritance. The lab will also demonstrate polymorphism, showcasing how objects of different classes can respond to the same method call in different ways. Finally, you will utilize the super() method to effectively manage inheritance relationships.
Python
Understand Decorators in Python

Understand Decorators in Python

In this lab, you will gain a comprehensive understanding of decorators in Python, a powerful feature for modifying or enhancing functions and methods. We will begin by introducing the fundamental concept of decorators and exploring their basic usage. You will learn to use functools.wraps, explore the property decorator, and differentiate between instance, class, and static methods.
Python
Function Return Values and Scope in Python

Function Return Values and Scope in Python

In this lab, you will deepen your understanding of functions in Python by exploring their return values and the concept of variable scope. You will learn how to add return values, differentiate local and global variables, modify global variables using the global keyword, and understand nonlocal variables in nested functions.
Python
Understand Operators in Python

Understand Operators in Python

In this lab, you will gain a comprehensive understanding of various operators in Python, a fundamental concept for writing effective code. We will explore and practice using arithmetic, comparison, assignment, logical, bitwise, membership, and identity operators through hands-on exercises using the VS Code editor.
Python
Number Types and Operations in Python

Number Types and Operations in Python

In this lab, you will gain a fundamental understanding of number types and operations in Python. We will explore the characteristics of integer, boolean, floating-point, and complex number types, including their immutability and how to check their types and memory addresses. Through hands-on exercises, you will learn how to convert between different number types and perform basic arithmetic operations, solidifying your knowledge of Python's numerical capabilities.
Python
Lambda Functions in Python

Lambda Functions in Python

In this lab, you will learn how to use lambda functions in Python. We will begin by understanding the concept of anonymous functions and the `lambda` keyword, comparing them to traditional function definitions. You will then create simple lambda functions with varying numbers of parameters. The lab will further explore how to effectively use lambda functions with built-in Python functions like `sorted`. Finally, we will discuss best practices for using lambda functions to ensure your code is readable and maintainable.
Python
Errors and Exceptions in Python

Errors and Exceptions in Python

In this lab, you will gain a practical understanding of errors and exceptions in Python. We will explore how to identify common syntax errors that prevent code execution, recognize various types of exceptions that occur during runtime, and clearly differentiate between these two fundamental concepts in Python programming. Through hands-on exercises, you will learn to spot and fix issues like incorrect indentation, missing syntax elements, and other common pitfalls, building a solid foundation for writing robust and error-free Python code.
Python
Understand Identifiers in Python

Understand Identifiers in Python

In this lab, you will gain a comprehensive understanding of identifiers in Python. You will learn the fundamental rules governing how to name variables, functions, classes, and other objects in your Python code. Through hands-on practice, you will identify valid and invalid identifier names, reinforcing the naming conventions. The lab will also cover special identifier conventions used in Python, equipping you with the knowledge to write clear, readable, and maintainable code.
Python
Operator Precedence in Python

Operator Precedence in Python

In this lab, you will gain a practical understanding of operator precedence in Python. We will explore how Python handles basic arithmetic operations, understand precedence rules with mixed operators, and learn how to use parentheses to explicitly control the order of evaluation, ensuring your code behaves exactly as intended.
Python
Understand Loops in Python

Understand Loops in Python

In this lab, you will gain a fundamental understanding of loops in Python, essential tools for repetitive tasks. We will explore for loops, iteration, the range() function, while loops, and controlling loop flow with break and continue statements.
Python
Handle Input and Output in Python

Handle Input and Output in Python

In this lab, you will learn the fundamental concepts of handling input and output in Python. We will explore how to display information to the console using the print() function, including controlling separators between multiple arguments. Furthermore, you will gain practical experience in obtaining user input from the keyboard, writing data to files, and reading data back from files, covering essential skills for interacting with external data sources in your Python programs.
Python
Python Development Tools

Python Development Tools

In this lab, you will explore various tools for Python development, including the standard interactive mode, IPython for enhanced interaction, Vim for script writing, and IDLE for integrated development. Gain practical experience with different Python development workflows.
Python
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 175
  • Next