4. What is the difference between declaring a variable and assigning a value to it in Python?
Anonymous Quiz
19%
A. There is no difference
47%
B. Declaring initializes with a value, assigning a value changes the value of an existing variable
30%
C. Declaring a variable creates a variable, while assigning a value creates a new variable
4%
D. Assigning a value is only done with strings
5. What is the significance of using an underscore (_) in variable names in Python?
Anonymous Quiz
22%
A. It indicates a reserved word
66%
B. It separates words in a variable name
6%
C. It is not allowed in variable names
6%
D. It is used for mathematical operations
π1
πNew Subscribers
Welcome!
It is good for you if you scroll up and see the previous lessons we have been learning.
Also don't forget to invite your friends ,who are interested in programming, to our channel.
@python_pioneers
Welcome!
It is good for you if you scroll up and see the previous lessons we have been learning.
Also don't forget to invite your friends ,who are interested in programming, to our channel.
@python_pioneers
Python Pioneers: A Beginner's Guide πͺπΉ pinned Β«πNew Subscribers Welcome! It is good for you if you scroll up and see the previous lessons we have been learning. Also don't forget to invite your friends ,who are interested in programming, to our channel. @python_pioneersΒ»
1β£0β£1β£0β£1β£1β£0β£1β£0β£1β£1β£0β£1β£1β£1β£0β£1β£0β£
Test your knowledge about arithmetic operations in python with these easy questions βββββ
Test your knowledge about arithmetic operations in python with these easy questions βββββ
π1
9. What is the result of (17 - 6) / 2 in Python?
Anonymous Quiz
75%
A) 5.5
12%
B) 6
7%
C) 6.5
5%
D) 7
α₯α«αααΉ ααα αα α© α αα°απ π or π
π16π2
Good Morning α°αα½! α₯α΅α² αα
α½α α αα α α΅α°ααͺ α³αͺα α αα₯α§α΅α’
You get what you give:
Once, there was a farmer who regularly sold butter to a baker. One day, the baker decided to weigh the butter to see if he was getting the exact amount that he asked for. He found out that he wasnβt, so he took the farmer to court.
The judge asked the farmer if he uses any measure to weigh the butter. The farmer replied, βYour Honor, Iβm primitive. I donβt have a proper measure, but I do have a scale.β
The judge replied, βThen how do you weigh the butter?β
The farmer replied; βYour Honor, long before the baker started buying butter from me, I have been buying a pound loaf of bread from him. Every day, when the baker brings the bread, I put it on the scale and give him the same weight in butter. If anyone is to be blamed, itβs the baker.β
Moral of the story:In life, you get what you give. Donβt try to cheat others.
ααα«α αα ααααα½α!
#EnglishStories
@python_pioneers
@python_pioneers
You get what you give:
Once, there was a farmer who regularly sold butter to a baker. One day, the baker decided to weigh the butter to see if he was getting the exact amount that he asked for. He found out that he wasnβt, so he took the farmer to court.
The judge asked the farmer if he uses any measure to weigh the butter. The farmer replied, βYour Honor, Iβm primitive. I donβt have a proper measure, but I do have a scale.β
The judge replied, βThen how do you weigh the butter?β
The farmer replied; βYour Honor, long before the baker started buying butter from me, I have been buying a pound loaf of bread from him. Every day, when the baker brings the bread, I put it on the scale and give him the same weight in butter. If anyone is to be blamed, itβs the baker.β
Moral of the story:In life, you get what you give. Donβt try to cheat others.
ααα«α αα ααααα½α!
#EnglishStories
@python_pioneers
@python_pioneers
β€5π3π1
Our next lesson will be about Indentation in Python! Make sure to join us to learn more about this important concept in programming.
Pythonα α α ααα α¨α₯α αα ααα©!
@python_pioneers
@python_pioneers
Pythonα α α ααα α¨α₯α αα ααα©!
@python_pioneers
@python_pioneers
π1
β‘οΈβ‘οΈβ‘οΈβ‘οΈβ‘οΈβ‘οΈβ‘οΈβ‘οΈβ‘οΈβ‘οΈβ‘οΈβ‘οΈ
INDENTATION IN PYTHON
Indentation ααα (code α΅αα α αα£ α₯α αααα) α ααα½ programming languages αreadability αα ααα ααα ( code α ααα α₯αα΅αα α₯αα ααα΅ αα)
ααα αα α Python indentation αreadability α₯α» α³ααα α¨αααα syntax αα°α¨α³α αα α³ ααα’
1. Indentation Basics::
- Indentation α¨code blocks α΅αα΅ αα α«α α α₯αα°αα ααα³α¨α΅ αα α αα
- It's typically α α«α΅ spaces per level of indentation, αα α αα³αα΅ α°α α°αα tab prefer α«α¨αα (which are equivalent to four spaces in python).
- Consistent indentation is crucial for Python code to function correctly.
2. Code Blocks:
- Code blocks α¨ααααΈα α αα΅ αα grouped α¨αα codes section ααα’ ααα³α within loops, conditionals, and functions
- α Python, code blocks defined α¨αααα΅ α₯αα°ααα½ programming languages α curly braces ('{}') ααα α key words α³ααα α indentation ααα’
3. Example:
4. Indentation Errors:
- α α΅ααα indent α ααα΅α¨α α₯α spaces and tabs mix αα΅α¨α syntax error α₯αα²αα α α«α°αααα’
- Python α αααα code αα΅α₯ α¨indentation α½αα α«α 'IndentationError' raise α«α°αααα’
5. Best Practices:
- Use a consistent indentation style throughout your codebase.
- Most Python codebases use four spaces for each level of indentation.
- Use an editor or IDE that automatically converts tabs to spaces to avoid indentation issues.
Remember, α python indentation α¨αααα code α₯αα²αα α₯ ααα΅α¨α α₯α» α¨αα α α α³ααα α¨αααα α α£α α α΅ααα α¨syntax part ααα£ α₯αα you have to pay attention to it.
@python_pioneers
@python_pioneers
INDENTATION IN PYTHON
Indentation ααα (code α΅αα α αα£ α₯α αααα) α ααα½ programming languages αreadability αα ααα ααα ( code α ααα α₯αα΅αα α₯αα ααα΅ αα)
ααα αα α Python indentation αreadability α₯α» α³ααα α¨αααα syntax αα°α¨α³α αα α³ ααα’
1. Indentation Basics::
- Indentation α¨code blocks α΅αα΅ αα α«α α α₯αα°αα ααα³α¨α΅ αα α αα
- It's typically α α«α΅ spaces per level of indentation, αα α αα³αα΅ α°α α°αα tab prefer α«α¨αα (which are equivalent to four spaces in python).
- Consistent indentation is crucial for Python code to function correctly.
2. Code Blocks:
- Code blocks α¨ααααΈα α αα΅ αα grouped α¨αα codes section ααα’ ααα³α within loops, conditionals, and functions
- α Python, code blocks defined α¨αααα΅ α₯αα°ααα½ programming languages α curly braces ('{}') ααα α key words α³ααα α indentation ααα’
3. Example:
if condition:
# This block is indented under the if statement.
statement1
statement2
else:
# This block is indented under the else statement.
statement3
4. Indentation Errors:
- α α΅ααα indent α ααα΅α¨α α₯α spaces and tabs mix αα΅α¨α syntax error α₯αα²αα α α«α°αααα’
- Python α αααα code αα΅α₯ α¨indentation α½αα α«α 'IndentationError' raise α«α°αααα’
5. Best Practices:
- Use a consistent indentation style throughout your codebase.
- Most Python codebases use four spaces for each level of indentation.
- Use an editor or IDE that automatically converts tabs to spaces to avoid indentation issues.
Remember, α python indentation α¨αααα code α₯αα²αα α₯ ααα΅α¨α α₯α» α¨αα α α α³ααα α¨αααα α α£α α α΅ααα α¨syntax part ααα£ α₯αα you have to pay attention to it.
@python_pioneers
@python_pioneers
β€2β‘1