Created
November 15, 2019 01:15
-
-
Save cacapon/2fa55722f0e71edae5e39d76f4386a3d to your computer and use it in GitHub Desktop.
これは何でしょう?
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
var = [1,30,'fizz','buzz','fizzbuzz',1,3,5,15] | |
def func(): | |
# 指定の数値その1から指定の数値その2まで繰り返す | |
for v in range(var[0],var[1]+1): | |
# vが15だったら | |
if v % 15 == 0: | |
print("{}:{}".format(var[5],var[4])) | |
# vが3だったら | |
elif v%3==0: | |
print("{}:{}".format(var[5], var[2])) | |
# vが5だったら | |
elif v %5 == 0: | |
print("{}:{}".format(var[5], var[3])) | |
else: | |
print("{}:".format(var[5])) | |
var[5] = var[5] + 1 | |
func() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment