This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp = 33 | |
if 25<=temp: | |
print("夏日です。") | |
elif 30<=temp: | |
print("真夏日です。") | |
elif 35<=temp: | |
print("猛暑日です。") | |
else: | |
print("上着が必要かもしれません。") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text = input('テストの点数は?') | |
point = int(text) | |
if point >= 80: | |
print('優') | |
elif point >= 70: | |
print('良') | |
elif point >= 60: | |
print('可') | |
else: | |
print('不可') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
point_input = input("あなたの点数は?") | |
point = int(point_input) | |
if point >= 80: | |
print("あなたの成績は優です。") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
atesaki = "佐藤" | |
okurinusi = "山田" | |
kinngaku = 10000 | |
text_template = '''{}様 | |
株式会社NEKOPPYの{}です。 | |
今月の請求金額は{}円です。 | |
よろしくお願いいたします。''' | |
text=text_template.format(atesaki, okurinusi, kinngaku) | |
print(text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
season = ["春","夏","秋","冬"] | |
gusu = [2,4,6,8] | |
kisu = [1,3,5,7,9] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
food = ["魚","鳥","肉","そば","うどん","ナス"] | |
for grill in food: | |
print("焼き",grill) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
point = [70,80,90,100] | |
total = 0 | |
for sum in point: | |
total = total+sum | |
print("合計点は{}です。".format(total)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
score_list = [70,80,90,100] | |
total = 0 | |
for score in score_list: | |
total = total+score | |
print("合計点は{}です。".format(total)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
week = ["月","火","水","木","金","土","日"] | |
print(week[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
week = ["月","火","水","木","金","土","日"] | |
print("木" in week) |
OlderNewer