この記事の目的は、生まれた都市とペットの名前を入れることによって、バンドの名前を作成するやり方をPythonで書き上げた。
- print("Welcome to the band name generator")
- city = input("which city did you grow up in?\n")
- pet = input ("what is your name of your pet?\n")
- print ("Your band name would be " + city + " " + pet)
例えば、which city did you grow up in?にnishinomiya
what is the name of your pet?にfredrick
と入力すると、Your bandname would be nishinomiya fredrickと出力される。
それが、この添付の画像に出力されている。
皆さんもぜひ試してみてください。