mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-07 15:03:20 -04:00
chore(curriculum): remove transcript header from first python lecture set (#61368)
This commit is contained in:
@@ -9,10 +9,6 @@ dashedName: what-is-python-and-what-are-some-common-uses-in-the-industry
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
Python is a general-purpose programming language known for its simplicity and ease of use. This ease of use has made Python the most popular programming language in modern times. In 2024, Python officially surpassed JavaScript as the most popular language on GitHub.
|
||||
|
||||
Python is used in many fields like data science and machine learning, web development, scripting and automation, embedded systems, IoT, and much more.
|
||||
|
||||
@@ -9,10 +9,6 @@ dashedName: how-do-you-install-configure-and-use-python-in-your-local-environmen
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
In the last lecture, you learned what Python is and what you can do with it. Now, let's look into how you can set up Python on your local machine.
|
||||
|
||||
The best way to install Python on Windows and Mac is to download the installer from the official Python website. We'll also go over running Python on Linux later in this lecture.
|
||||
|
||||
@@ -10,10 +10,6 @@ dashedName: how-do-you-declare-variables-and-what-are-naming-conventions-to-name
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
In Python, variables are like a labelled box for storing and referencing data of different types. To declare variables in Python, you assign a value to an identifier with the assignment (`=`) operator. You don't need to use special keywords like `let` or `const` in JavaScript, or `char` in C#.
|
||||
|
||||
In Python, you just write the name of the variable on the left, followed by the assignment operator, and the value you want to assign the variable on the right. Here's an example of how to declare `name` and `age` variables:
|
||||
|
||||
@@ -9,10 +9,6 @@ dashedName: how-does-the-print-function-work
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
Every programming language has some way to output data to the terminal with a built-in method, function, property, or keyword. In Python, you can use the `print` function to print data to the terminal. Let's take a closer look at the `print` function so you can start using it with confidence.
|
||||
|
||||
One of the first things you do when you're learning any programming language is to write a simple `Hello world!` program. You can do that really easily in Python with just the `print` function.
|
||||
|
||||
@@ -10,10 +10,6 @@ dashedName: what-are-common-data-types-in-python-and-how-do-you-get-the-type-of-
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
Python is a dynamically-typed language like JavaScript, meaning you don't need to explicitly declare types for variables. The language knows what data type a variable is based on what you assign to it.
|
||||
|
||||
Here are some examples:
|
||||
|
||||
@@ -10,10 +10,6 @@ dashedName: how-do-you-work-with-strings
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
A string is a sequence of characters surrounded by either single or double quotation marks. In some programming languages, characters surrounded by single quotes are treated differently than characters surrounded by double quotes, but in Python, they're treated equally. So, you can use either when working with strings. Here are some examples of strings:
|
||||
|
||||
```python
|
||||
|
||||
@@ -10,10 +10,6 @@ dashedName: how-do-you-work-with-integers-and-floating-point-numbers
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
Integers and floats are the primary numeric data types in Python. With them, you can store numeric data and perform mathematical operations.
|
||||
|
||||
Let's look at what integers and floats are, how to perform arithmetic calculations with them, and at several methods Python provides for working with both.
|
||||
|
||||
@@ -9,10 +9,6 @@ dashedName: how-do-functions-work-in-python
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
Functions are reusable pieces of code that run when you call them. Many programming languages come with built-in functions that make it easier to get started. Python is no exception, and we've already covered some built-in functions like `print()` in previous lectures.
|
||||
|
||||
Another helpful built-in function is `input()`, which lets you prompt the user for input:
|
||||
|
||||
@@ -9,10 +9,6 @@ dashedName: what-is-scope-in-python-and-how-does-it-work
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
In Python, scope determines the point at which you can access a variable. It's what controls the lifetime of a variable and how it is resolved in different parts of the code.
|
||||
|
||||
To correctly determine scope, Python follows the **LEGB** rule, which stands for the following:
|
||||
|
||||
@@ -9,10 +9,6 @@ dashedName: how-do-conditional-statements-and-logical-operators-work
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
Conditional statements, or conditionals, let you control the flow of your program based on whether certain conditions are true or false.
|
||||
|
||||
But before we get into all that, let's go over the basic building blocks of conditional statements, starting with comparison operators. Comparison operators are operators that let you compare two or more values, and return a boolean value.
|
||||
|
||||
@@ -9,10 +9,6 @@ dashedName: what-are-some-common-string-methods
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
Python provides a number of built-in methods that make working with strings a breeze. They include, but are not limited to, the following:
|
||||
|
||||
- `upper()`: Returns a new string with all characters converted to uppercase.
|
||||
|
||||
@@ -9,10 +9,6 @@ dashedName: how-do-augmented-assignments-work
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
Augmented assignment combines a binary operation with an assignment in one step. It takes a variable, applies an operation to it with another value, and stores the result back into the same variable.
|
||||
|
||||
If you're familiar with a language like JavaScript, you've probably heard of the addition assignment operator (`+=`) or subtraction assignment (`-=`), and others. Those exist in Python, too. The only difference is that they're referred to as **augmented assignments**.
|
||||
|
||||
@@ -9,10 +9,6 @@ dashedName: what-are-truthy-and-falsy-values-and-how-do-boolean-operators-and-sh
|
||||
|
||||
# --description--
|
||||
|
||||
The video for this lecture isn't available yet, one will be available soon. Here is a transcript of the lecture for now:
|
||||
|
||||
# --transcript--
|
||||
|
||||
In the previous lecture, you learned how to use comparison operators and conditional statements to control the flow of your programs.
|
||||
|
||||
While those are very powerful, you will often run into situations where you need to compare multiple values at once. This can lead to nested conditional statements, for example:
|
||||
|
||||
Reference in New Issue
Block a user