#42 Python Looping Statements - For Loop

preview_player
Показать описание
Hello Viewers, my name is Raja Subramanian and Welcome to my YouTube Channel Coders Companion

About this video:
In this video I have explained about how to use for loop in python, syntax of for loop, example programs using for loop, explained the use of range function and how to use for loop with range function

My Social Media Profile

This is a series a videos on python programming and listed below are some of the videos from my python programming playlist.

27) Data Types and Type Conversion - Dictionary

28) Data Types and Type Conversion - Set

29) Indexing and Slicing - Indexing

30) Indexing and Slicing - Slicing

31) Indexing and Slicing - Slicing with step

32) Python Operators - Arithmetic Operators

33) Python Operators - Comparison Operators

34) Python Operators - Logical Operators

35) Python Operators - Bitwise Operators

36) Python Operators - Assignment Operators

37) Python Operators - Membership Operators

38) Python Operators - Identity Operators with Immutable types

39) Python Operators - Identity Operators with Mutable types

40) Python Conditional Statements

41) Python Looping Statements - While Loop

42) Python Looping Statements - For Loop

43) Python Looping Statements - Break, Continue and Looping with else

44) Python Looping Statements - Nested Loop

45) Working with String - String Operations and Format Specifiers

46) Working with String - String Formatters

47) Working with String - Built-in String Functions
Рекомендации по теме
Комментарии
Автор

Could you please help me solve the following? I thought the output should be 2 3 4 7 but it's not

i = 2
x = 1

for i in range(5):
print(i, end = ' ')
X += 2

print(x, end = ' ')

liri
visit shbcf.ru