Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit563b8ad

Browse files
author
hussienalrubaye
committed
loops
1 parent4307761 commit563b8ad

File tree

6 files changed

+233
-50
lines changed

6 files changed

+233
-50
lines changed

‎.idea/workspace.xml‎

Lines changed: 146 additions & 50 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎LoopControl.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
4+
5+
defmain():
6+
word="python"
7+
forletterinword:
8+
if(letter=='t'):
9+
pass
10+
print(" blcok is padded")
11+
print(letter)
12+
print("progam end")
13+
14+
15+
if__name__=='__main__':main()

‎conditional_nested_if.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
defmain():
2+
Degree=input("enter your Degree:")
3+
if(int(Degree)>=90 ):
4+
print("hi")
5+
x=5
6+
if(int(Degree)>94):
7+
print("Your Score is +A")
8+
else:
9+
print("Your Score is -A")
10+
elif(int(Degree)>=80andint(Degree)<=89):
11+
print("Your Score is B")
12+
elif(int(Degree)>=70andint(Degree)<=79):
13+
print("Your Score is C")
14+
elif(int(Degree)>=60andint(Degree)<=69):
15+
print("Your Score is D")
16+
elif(int(Degree)>=50andint(Degree)<=59):
17+
print("Your Score is E")
18+
else:
19+
print("You Fail")
20+
21+
22+
if__name__=='__main__':main()

‎loop_While.py‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
3+
4+
5+
defmain():
6+
print("program start")
7+
i=1
8+
while(i<100):
9+
if(i%4==0):
10+
print("Count {}".format(i))
11+
i+=1
12+
13+
print("progarm end")
14+
15+
16+
17+
if__name__=='__main__':main()

‎loops_for.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
4+
5+
defmain():
6+
l=[1,3,4,'hi',3.4]
7+
print(range(5))
8+
foriinrange(5):
9+
print(l[i])
10+
11+
12+
13+
14+
15+
if__name__=='__main__':main()

‎loops_nested_loop.py‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
3+
4+
5+
defmain():
6+
i=0
7+
while(i<5):
8+
print("i={}".format(i))
9+
i+=1
10+
j=5
11+
while(j>i):
12+
print("j={}".format(j))
13+
j-=1
14+
15+
16+
17+
18+
if__name__=='__main__':main()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp