From 91d9bb6d454072ce6958cbbf57a453af88ebd222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Wozny?= Date: Thu, 31 Oct 2024 08:57:05 +0100 Subject: [PATCH] fix(learnpython/en): fixed typos in the learnpython english tutorial --- tutorials/learnpython.org/en/CsvPython.md | 2 +- tutorials/learnpython.org/en/Map, Filter, Reduce.md | 4 ++-- tutorials/learnpython.org/en/Modules and Packages.md | 2 +- tutorials/learnpython.org/en/String Formatting.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorials/learnpython.org/en/CsvPython.md b/tutorials/learnpython.org/en/CsvPython.md index 1607f800f..8f8039330 100644 --- a/tutorials/learnpython.org/en/CsvPython.md +++ b/tutorials/learnpython.org/en/CsvPython.md @@ -45,7 +45,7 @@ For example: with open(filename, 'r') as csvfile: csvreader = csv.reader(csvfile) -Here, we first open the CSV file in READ mode and name the file onject as csvfile. We use context manager to open file so that we don't have to worry about closing file. csv.reader function takes file object as input and returns an iterable object. We save the iterable object as csvreader. +Here, we first open the CSV file in READ mode and name the file object as csvfile. We use context manager to open file so that we don't have to worry about closing file. csv.reader function takes file object as input and returns an iterable object. We save the iterable object as csvreader. As we know, csvreader is an iterable object and therefore we can iterate using for loop: diff --git a/tutorials/learnpython.org/en/Map, Filter, Reduce.md b/tutorials/learnpython.org/en/Map, Filter, Reduce.md index a033f9ca1..df4523276 100644 --- a/tutorials/learnpython.org/en/Map, Filter, Reduce.md +++ b/tutorials/learnpython.org/en/Map, Filter, Reduce.md @@ -1,7 +1,7 @@ Tutorial -------- -Map, Filter, and Reduce are paradigms of functional programming. They allow the programmer (you) to write simpler, shorter code, without neccessarily needing to bother about intricacies like loops and branching. +Map, Filter, and Reduce are paradigms of functional programming. They allow the programmer (you) to write simpler, shorter code, without necessarily needing to bother about intricacies like loops and branching. Essentially, these three functions allow you to apply a function across a number of iterables, in one fell swoop. ```map``` and ```filter``` come built-in with Python (in the ```__builtins__``` module) and require no importing. ```reduce```, however, needs to be imported as it resides in the ```functools``` module. Let's get a better understanding of how they all work, starting with ```map```. @@ -17,7 +17,7 @@ Where ```func``` is the function on which each element in ```iterables``` (as ma Let's see how these rules play out with the following examples. -Say I have a list (```iterable```) of my favourite pet names, all in lower case and I need them in uppercase. Traditonally, in normal pythoning, I would do something like this: +Say I have a list (```iterable```) of my favourite pet names, all in lower case and I need them in uppercase. Traditionally, in normal pythoning, I would do something like this: my_pets = ['alfred', 'tabitha', 'william', 'arla'] uppered_pets = [] diff --git a/tutorials/learnpython.org/en/Modules and Packages.md b/tutorials/learnpython.org/en/Modules and Packages.md index 171e1581f..d8c98e1a8 100644 --- a/tutorials/learnpython.org/en/Modules and Packages.md +++ b/tutorials/learnpython.org/en/Modules and Packages.md @@ -102,7 +102,7 @@ shorter, and doesn't require you to specify every object you want to import from Modules may be loaded under any name you want. This is useful when importing a module conditionally to use the same name in the rest of the code. -For example, if you have two `draw` modules with slighty different names, you may do the following: +For example, if you have two `draw` modules with slightly different names, you may do the following: # game.py diff --git a/tutorials/learnpython.org/en/String Formatting.md b/tutorials/learnpython.org/en/String Formatting.md index 0b589b511..1dbb81be8 100644 --- a/tutorials/learnpython.org/en/String Formatting.md +++ b/tutorials/learnpython.org/en/String Formatting.md @@ -52,7 +52,7 @@ print(format_string % data) Expected Output --------------- -#test_output_contains("Hello John Doe. Your current balance is $53.44.", no_output_msg= "Make sure you add the `%s` in the correct spaces to the `format_string` to meeet the exercise goals!") +#test_output_contains("Hello John Doe. Your current balance is $53.44.", no_output_msg= "Make sure you add the `%s` in the correct spaces to the `format_string` to meet the exercise goals!") test_object('format_string') success_msg('Great work!')