私は数日間この作業をしています。私はいくつかのチュートリアルを見て、私の本を読んで、私は非常にコーディングに新しいです。pythonの倍数19
Iはこのプログラムは次に、200よりも大きい19の倍数を入力するようにユーザに促すべき
、プログラムは、入力を分析し、各に対する応答を表示する必要があり、このプログラムを作成するために必要としてい分析の4つの可能な結果。以下のサンプルランを参照してください。
Enter an exact multiple of 19 that is greater than 200 76
No, 76 is a multiple of 19 but it is not greater than 200
>>>
Enter an exact multiple of 19 that is greater than 200 55
55 is not over 200 and also is not a multiple of 19
>>>
Enter an exact multiple of 19 that is greater than 200 222
222 is over 200 but is not a multiple of 19
>>>
Enter an exact multiple of 19 that is greater than 200 380
Good input. 19 divides into 380 exactly 20 times
この
は私が持っているもので、これまで#promt user to enter an exact multiple of 19 that is larger than 200
#assign variable a to user input
def main() :
random = int(input('Enter an exact multiple of 19 that is greater than 200:'))
number = random/19
if random > 200 :
print('Good input 19 divides into', random , 'exactly' , number ,'times')
if random % 19 == 0 or random <200:
print('is a multiple of 19')
else:
print('is not a multiple of')
main()
私は380を入力するユーザーのためのラインを吐き出すためにプログラムを得ることができますが、私は限りアップ書き方などの損失で午前他の出力。ヘルプは素晴らしいだろう!
私はイムは、彼の宿題をやってと思うけれども、私は、働いた何相続人
ああ、OLE」fizzbuzzテスト。 (これは、銀の皿に手渡さずにそれを理解するのに十分であるはずです) – Enfyve