filmov
tv
Python 3 Basics # 11.1 | For Loop in Python | Debugging For Loops in Python

Показать описание
Python 3 Basics 12 | For Loop in Python | Debugging For Loops in Python
Looping in Python
For loops are traditionally used when you have a block of code which you want to repeat a fixed number of times. The Python for statement iterates over the members of a sequence in order, executing the block each time. Contrast the for statement with the ''while'' loop, used when a condition needs to be checked each iteration, or to repeat a block of code forever. For example:
For loop from 0 to 2, therefore running 3 times.
for x in range(0, 3):
print("We're on time %d" % (x))
Topic to be covered - For Loops in Python 3
a. Syntax of For Loop
b. Debugging For Loop
c. Small Application of For Loop
for i in 'Analytics':
print(i)
list_country = ['India','Russia','Japan','America','Germany']
for country in list_country:
print(country)
for i in [1,2,3,4,5]:
print(i)
for i in range(10,20,3):
print(i)
warner_runs = [50,99,90,100,10,55]
total_runs = 0
for run in warner_runs:
total_runs += run
print('Total Runs Scored by David Warner :', total_runs)
print('Average Score by David Warner :', total_runs/len(warner_runs))
print(f'Total Runs : {total_runs} and Average Score : {total_runs/len(warner_runs)}')
All the playlist of this youtube channel
===================================
1. Data Preprocessing in Machine Learning
2. Confusion Matrix in Machine Learning, ML, AI
3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz
4. Cross Validation, Sampling, train test split in Machine Learning
5. Drop and Delete Operations in Python Pandas
6. Matrices and Vectors with python
7. Detect Outliers in Machine Learning
8. TimeSeries preprocessing in Machine Learning
9. Handling Missing Values in Machine Learning
10. Dummy Encoding Encoding in Machine Learning
11. Data Visualisation with Python, Seaborn, Matplotlib
12. Feature Scaling in Machine Learning
13. Python 3 basics for Beginner
14. Statistics with Python
15. Data Preprocessing in Machine Learning
16. Sklearn Scikit Learn Machine Learning
17. Linear Regression, Supervised Machine Learning
18 Interview Questions on Machine Learning, Artificial Intelligence, Python Pandas and Python Basics
19. Jupyter Notebook Operations
Looping in Python
For loops are traditionally used when you have a block of code which you want to repeat a fixed number of times. The Python for statement iterates over the members of a sequence in order, executing the block each time. Contrast the for statement with the ''while'' loop, used when a condition needs to be checked each iteration, or to repeat a block of code forever. For example:
For loop from 0 to 2, therefore running 3 times.
for x in range(0, 3):
print("We're on time %d" % (x))
Topic to be covered - For Loops in Python 3
a. Syntax of For Loop
b. Debugging For Loop
c. Small Application of For Loop
for i in 'Analytics':
print(i)
list_country = ['India','Russia','Japan','America','Germany']
for country in list_country:
print(country)
for i in [1,2,3,4,5]:
print(i)
for i in range(10,20,3):
print(i)
warner_runs = [50,99,90,100,10,55]
total_runs = 0
for run in warner_runs:
total_runs += run
print('Total Runs Scored by David Warner :', total_runs)
print('Average Score by David Warner :', total_runs/len(warner_runs))
print(f'Total Runs : {total_runs} and Average Score : {total_runs/len(warner_runs)}')
All the playlist of this youtube channel
===================================
1. Data Preprocessing in Machine Learning
2. Confusion Matrix in Machine Learning, ML, AI
3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz
4. Cross Validation, Sampling, train test split in Machine Learning
5. Drop and Delete Operations in Python Pandas
6. Matrices and Vectors with python
7. Detect Outliers in Machine Learning
8. TimeSeries preprocessing in Machine Learning
9. Handling Missing Values in Machine Learning
10. Dummy Encoding Encoding in Machine Learning
11. Data Visualisation with Python, Seaborn, Matplotlib
12. Feature Scaling in Machine Learning
13. Python 3 basics for Beginner
14. Statistics with Python
15. Data Preprocessing in Machine Learning
16. Sklearn Scikit Learn Machine Learning
17. Linear Regression, Supervised Machine Learning
18 Interview Questions on Machine Learning, Artificial Intelligence, Python Pandas and Python Basics
19. Jupyter Notebook Operations