#100DaysOfLearningPython
Day-1
Functions are predefined actions that the computer can perform. For instance, the `print` function is used to display text in the terminal window.
These functions take inputs, called arguments, to carry out their tasks effectively.
@cs50#ClanDevs
What is the difference between = (single equal to) and == (double equal to) ?
▪ The = (single equal to) is use to assign the value on the right to a variable on the left.
▪ The == (double equal to) is use to compare to two values.
⬇
#100DaysOfLearningPython#Python#DDSRY
Indentation in Python:
Python use #indentation ( 4 white space at the beginning of a line )
In #Python3 Indentation is mandatory because, program won't work without it.
⬇
#100DaysOfLearningPython
#Day23 of #100DaysOfLearningPython
>>>Problems Set 4 was the most difficult to solve even in the second attempt, but conquered all the problems again.
>>>Watched "Style" lecture about CodeReadability ,python code enhancing tools such as black and PEP8.
#CS50Python#CodingJourney
#100DaysOfLearningPython
Day-2
The print function automatically includes a default piece of code end='\n'. Which creates a line break.
However, we can technically modify it as in line 2 so that the line is not created.
@cs50#ClanDevs#SprintLearning
What is the order of operations in #Python Programming Language ?
1. Parenthese ()
2. Exponents **
3, Multiplication *
4. Division /
5. Addition +
6. Subtraction
▪ Just remember PEMDAS.
⬇
#100DaysOfLearningPython#100DaysOfCode#edutwitter
Why does / (divide) round down?
▪ It's ❌ really rounding down, its just dropping the fractional part after the decimal.
▪ Try this, 9.0/3.0 and compare it to 9/3 and you will see the difference.
#100DaysOfLearningPython#100DaysOfCode#DDSRY