📰 IT NachrichtenToday’s NYT Mini Crossword Answers for Saturay, Sept. 12(12.09.2026 um 07:43 Uhr)
🔧 AI Nachrichten Etzioni on AI: What kids tell chatbots, but not you(04.09.2026 um 16:05 Uhr)
🔧 AI Nachrichten OpenAI Wants to Know if an AI Industry Slowdown Would Even Be Legal(11.09.2026 um 01:28 Uhr)
🔧 AI Nachrichten OpenAI puts Pro subscriptions on hold due to Astra demand(10.09.2026 um 22:59 Uhr)
🔧 AI Nachrichten OpenAI’s feud with mathematicians is only escalating(11.09.2026 um 22:57 Uhr)
📰 IT NachrichtenToday’s NYT Mini Crossword Answers for Saturay, Sept. 12(12.09.2026 um 07:43 Uhr)
🔧 AI Nachrichten Etzioni on AI: What kids tell chatbots, but not you(04.09.2026 um 16:05 Uhr)
🔧 AI Nachrichten OpenAI Wants to Know if an AI Industry Slowdown Would Even Be Legal(11.09.2026 um 01:28 Uhr)
🔧 AI Nachrichten OpenAI puts Pro subscriptions on hold due to Astra demand(10.09.2026 um 22:59 Uhr)
🔧 AI Nachrichten OpenAI’s feud with mathematicians is only escalating(11.09.2026 um 22:57 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 2 Min Lesezeit
0

for loop & If,else condition

↗ Quelle (dev.to)
🗣️ Stimme:

For loop



The for Loops in Python are a special type of loop statement that is used for sequential traversal. Python for loop is used for iterating over an iterable like a String, Tuple, List, Set, or Dictionary.



Image description



example :




CODE
name = 'varatharajan'

for alphabet in name:
print(alphabet, end=' ')








result



v a r a t h a r a j a n



if,else



The if statement is the most simple decision-making statement. It is used to decide whether a certain statement or block of statements will be executed or not.

The elif keyword is Python's way of saying "if the previous conditions were not true, then try this condition".



example 1 :




CODE
a = 33
b = 200
if b > a:
print("b is greater than a")






result

b is greater than a



example 2 :




CODE
txt = '12a4'

for num in txt:
if num>='0' and num<='9':
print(num,end=' ')
else:
print('Not Decimal',end=' ')






result

1 2 Not Decimal 4



Task :

name = input("Enter Name: ")

Lakshmi pritha

Guru prasanna

Guhanraja

Varatharajan



1: Names starting with letter 'G'

2: Names endings with 'a'

3: Names having space in between

4: Names having more than 9 letters






input






CODE
name1 = input("Enter the first name: ")
name2 = input("Enter the second name: ")
name3 = input("Enter the third name: ")
name4 = input("Enter the fourth name: ")
name = [name1, name2, name3, name4]

# Check if names start with 'G'
for letter in name:
if letter[0]=='G':
print(letter)

# Check if names end with 'a'
for alphabet in name:
if alphabet[-1]=='a':
print(alphabet)

# Check if names contain a space
for alpha in name:
for space in alpha:
if space==' ':
print(alpha)

# Check if names are longer than 9 characters
for character in name:
if len(character)>9:
print(character)









Output





Enter the first name: Varatharajan

Enter the second name: Guru prasanna

Enter the third name: Lakshmi pritha

Enter the fourth name: Guhanraja

Guru prasanna

Guhanraja

Guru prasanna

Lakshmi pritha

Guhanraja

Guru prasanna

Lakshmi pritha

Varatharajan

Guru prasanna

Lakshmi pritha

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
2 Quellen
Seattle Times sues Microsoft and OpenAI, alleging they trained their AI on its journalism
1 Quelle
Today’s NYT Mini Crossword Answers for Saturay, Sept. 12
1 Quelle
Etzioni on AI: What kids tell chatbots, but not you
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten for loop & If,else condition

Thematisch verwandte Begriffe: loop, Ifelse, condition · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...