Packt
Intermediate Ruby Programming and Control Structures

Ce cours n'est pas disponible en Français (France)

Nous sommes actuellement en train de le traduire dans plus de langues.
Packt

Intermediate Ruby Programming and Control Structures

Inclus avec Coursera Plus

Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

13 heures pour terminer
3 semaines à 4 heures par semaine
Planning flexible
Apprenez à votre propre rythme
Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

13 heures pour terminer
3 semaines à 4 heures par semaine
Planning flexible
Apprenez à votre propre rythme

Ce que vous apprendrez

  • Identify the differences between single and double quotes in Ruby strings.

  • Explore the various loop and control structures in Ruby.

  • Utilize debugging tools to identify and fix code issues in Ruby programs.

  • Differentiate and select appropriate array methods for handling ranges in Ruby.

Compétences que vous acquerrez

  • Catégorie : Intermediate Ruby programming
  • Catégorie : Ruby control structures
  • Catégorie : Ruby debugging
  • Catégorie : string manipulation Ruby
  • Catégorie : array methods Ruby

Détails à connaître

Certificat partageable

Ajouter à votre profil LinkedIn

Récemment mis à jour !

septembre 2024

Évaluations

5 devoirs

Enseigné en Anglais

Découvrez comment les employés des entreprises prestigieuses maîtrisent des compétences recherchées

Emplacement réservé

Élaborez votre expertise du sujet

Ce cours fait partie de la Spécialisation Learn to Code with Ruby
Lorsque vous vous inscrivez à ce cours, vous êtes également inscrit(e) à cette Spécialisation.
  • Apprenez de nouveaux concepts auprès d'experts du secteur
  • Acquérez une compréhension de base d'un sujet ou d'un outil
  • Développez des compétences professionnelles avec des projets pratiques
  • Obtenez un certificat professionnel partageable
Emplacement réservé
Emplacement réservé

Obtenez un certificat professionnel

Ajoutez cette qualification à votre profil LinkedIn ou à votre CV

Partagez-le sur les réseaux sociaux et dans votre évaluation de performance

Emplacement réservé

Il y a 10 modules dans ce cours

In this module, we will delve into the intricacies of handling strings in Ruby. You will learn the differences between single and double quotes, how to create multiline strings with here documents, and perform string comparisons using equality and inequality operators. We'll explore different methods for concatenation, understand indexing to access and modify string characters, and apply various string methods like 'length', 'empty'?, 'capitalize', 'reverse', and bang methods for mutating strings directly. By the end of this module, you'll have a comprehensive understanding of string operations in Ruby.

Inclus

14 vidéos2 lectures

In this module, we will explore various looping constructs in Ruby. You will learn the syntax and usage of the 'while' and 'until' loops, understanding how they execute based on conditional statements. We will tackle the FizzBuzz problem, a popular beginner coding challenge, and walk through its solution. Additionally, we will introduce control flow keywords such as 'next' and 'break', and delve into recursion, where methods call themselves to solve problems. By the end of this module, you will be adept at using loops and recursion to manage repetitive tasks and complex problem-solving in Ruby.

Inclus

9 vidéos

In this module, we will focus on debugging techniques in Ruby. You will learn to import and use the debug library to establish breakpoints with 'debugger' or 'binding.break', allowing you to pause execution and examine the program's state. We will cover the 'step' keyword to progress through code line by line and demonstrate how to use the 'info' keyword to list all variables and parameters. By combining these techniques, you will gain a thorough understanding of how to troubleshoot and resolve issues in your Ruby programs effectively.

Inclus

4 vidéos1 devoir

In this module, we will introduce you to arrays, a fundamental data structure in Ruby for storing ordered elements. You will learn how to create arrays, including nested arrays for multidimensional data structures. We'll cover different ways to access and overwrite array elements using square bracket syntax, the 'fetch' method, and methods like 'first', 'last', and 'values_at'. You'll also explore methods to evaluate array properties such as 'length', 'size', and 'empty'?, and compare arrays using equality, inequality, and the spaceship operator. Additionally, we'll dive into methods for adding and removing elements like 'push', 'pop', 'shift', 'unshift', and 'insert'. By the end, you'll have a comprehensive understanding of array creation, access, and manipulation in Ruby.

Inclus

17 vidéos

In this module, we will explore ranges in Ruby, an object that represents a sequence of numbers or letters. You'll learn to create numeric and alphabetical ranges and understand the rules of inclusivity and exclusivity using two and three dots. We will cover methods like 'include'? and 'member'? to check if a value exists within a range, and use the 'rand' method to generate random numbers. Additionally, you'll see how to extract sequences from strings or arrays using ranges, and incorporate ranges into case statements for efficient logic handling. Finally, we'll convert ranges to arrays using the 'to_a' method, giving you versatile tools for working with sequential data in Ruby.

Inclus

8 vidéos

In this module, we will dive deeper into array operations, focusing on iteration and advanced methods. You will learn to use the 'each' and 'each_with_index' methods for sequential element traversal, and how to nest 'each' method calls for more complex operations. We'll explore using traditional 'for' loops and alternatives like 'while' and 'until' loops for array iteration. Methods such as 'map', 'collect', 'select', 'reject', and 'partition' will be introduced to transform and filter arrays based on conditions. You will also learn to query arrays with methods like 'any?', 'all?', 'find', 'detect', 'index', 'include?', 'max', and 'min', and understand how to handle unlimited method arguments using the splat operator. By the end of this module, you'll have a comprehensive toolkit for effectively managing and manipulating arrays in Ruby.

Inclus

16 vidéos1 devoir

In this module, we will continue exploring advanced string manipulation techniques in Ruby. You will learn to use the 'split' method to divide strings into arrays based on specified delimiters and the 'join' method to merge array elements back into a single string. We will cover iterating over string characters with the 'chars' and 'each_char' methods, and converting strings to arrays for iteration. Additionally, you'll learn to count occurrences of substrings with the 'count' method, find positions of substrings using 'index' and 'rindex', and remove characters from strings with the 'delete' method. By the end of this module, you'll have a robust set of tools for handling and manipulating strings in your Ruby programs.

Inclus

7 vidéos

In this module, we will explore how object references and copies work in Ruby. We will then cover the 'dup' and 'clone' methods, which create copies of objects, isolating them from changes made to the source object. The 'freeze' method will be introduced to make objects immutable, ensuring their state cannot be altered. Additionally, we'll discuss how passing objects to methods can lead to mutations and how to manage these changes effectively. By the end of this module, you will have a solid understanding of object references, copying, and immutability in Ruby.

Inclus

4 vidéos1 devoir

In this module, we will introduce you to hashes, a versatile data structure for associating keys with values. You will learn how to create and manipulate hashes using various syntaxes, including hash rockets and shorthand notations with symbols as keys. We will cover methods for adding, iterating over, and checking the inclusion of key-value pairs, as well as extracting subsets, converting between hashes and arrays, and removing pairs. Additionally, you will explore advanced operations like merging hashes and creating hashes with default values, while addressing potential reference issues. By the end, you'll be proficient in creating, managing, and manipulating hashes in Ruby.

Inclus

15 vidéos

In this module, we will explore advanced array methods that provide powerful ways to manipulate and transform arrays in Ruby. You'll learn to reverse and sort arrays, remove duplicates with 'uniq', and eliminate 'nil' values using 'compact'. We will cover aggregation methods like 'inject' and 'reduce', as well as methods to flatten nested arrays. Additionally, you'll learn to extract random elements with 'sample', repeat elements using the asterisk operator, merge arrays while excluding duplicates, subtract elements, and find intersections between arrays with the '&' operator. By the end, you'll be adept at using these advanced methods to handle and manipulate arrays efficiently in your Ruby programs.

Inclus

12 vidéos1 lecture2 devoirs

Instructeur

Packt - Course Instructors
Packt
372 Cours9 744 apprenants

Offert par

Packt

Recommandé si vous êtes intéressé(e) par Software Development

Pour quelles raisons les étudiants sur Coursera nous choisissent-ils pour leur carrière ?

Felipe M.
Étudiant(e) depuis 2018
’Pouvoir suivre des cours à mon rythme à été une expérience extraordinaire. Je peux apprendre chaque fois que mon emploi du temps me le permet et en fonction de mon humeur.’
Jennifer J.
Étudiant(e) depuis 2020
’J'ai directement appliqué les concepts et les compétences que j'ai appris de mes cours à un nouveau projet passionnant au travail.’
Larry W.
Étudiant(e) depuis 2021
’Lorsque j'ai besoin de cours sur des sujets que mon université ne propose pas, Coursera est l'un des meilleurs endroits où se rendre.’
Chaitanya A.
’Apprendre, ce n'est pas seulement s'améliorer dans son travail : c'est bien plus que cela. Coursera me permet d'apprendre sans limites.’
Emplacement réservé

Ouvrez de nouvelles portes avec Coursera Plus

Accès illimité à plus de 7 000 cours de renommée internationale, à des projets pratiques et à des programmes de certificats reconnus sur le marché du travail, tous inclus dans votre abonnement

Faites progresser votre carrière avec un diplôme en ligne

Obtenez un diplôme auprès d’universités de renommée mondiale - 100 % en ligne

Rejoignez plus de 3 400 entreprises mondiales qui ont choisi Coursera pour les affaires

Améliorez les compétences de vos employés pour exceller dans l’économie numérique

Foire Aux Questions