Skip to content

Commit

Permalink
Merge pull request #10 from YushinOgasawara/develop
Browse files Browse the repository at this point in the history
[add]pythonの基礎2の機能追加
  • Loading branch information
YushinOgasawara authored Jun 17, 2024
2 parents 8e862b4 + bcd28d1 commit a6ec84d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions py-foundation2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ def main():

#繰り返し
roop()

#関数呼び出し
total = sum(1, 3)
print(total)

def branching():
num = 10
Expand All @@ -17,6 +21,20 @@ def branching():
def roop():
for i in range(5, 10, 1):
print(i)
list = ["a", "b", "c", "d"]
for i in list:
print(i)
# nが10になるまで繰り返し
n = 0
while n < 10:
print(n)
n += 1 # +1するのを忘れずに。

def sum(x, y):
sum_num = x+y
return sum_num



if __name__ == "__main__":
main()

0 comments on commit a6ec84d

Please sign in to comment.