more while examples

This commit is contained in:
Mert Gör 🇹🇷 2023-05-20 08:16:08 +03:00
parent 9894e496c2
commit a1dadd8d93
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
4 changed files with 25 additions and 0 deletions

5
s.ankara.py Normal file
View File

@ -0,0 +1,5 @@
s = 'ankara'
while s:
print(s)
s = s[1:]

6
s.while.py Normal file
View File

@ -0,0 +1,6 @@
s = {1, 10, 'ali', 20, 'veli', 'selami'}
while s:
x = s.pop()
print(x, end = ' ')

7
while-5.2.py Normal file
View File

@ -0,0 +1,7 @@
i = 10
while i > 0:
print(i, end=" ")
i -= 1
else:
print('Çıkış değeri:', i)

7
while-5.py Normal file
View File

@ -0,0 +1,7 @@
i = 10
while i:
print(i, end=' ')
i -= 1
else:
print('Çıkış değeri', i)