科学の箱

科学・IT・登山の話題

Python

automated the boring

投稿日:

まずは肩慣らし

print(‘Hello world!’)
print(‘What is your name?’) # ask for their name
myName = input()
print(‘It is good to meet you, ‘ + myName)
print(‘The length of your name is:’)
print(len(myName))
print(‘What is your age?’) # ask for their age
myAge = input()
print(‘You will be ‘ + str(int(myAge) + 1) + ‘ in a year.’)

python環境は設定をする。

python.exeに対してパスを通すか、python.exeのフォルダに移動しておく。

pythonでは余計なインデントは入れない。これ重要。

メタ情報

inarticle



メタ情報

inarticle



-Python
-

執筆者:


comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

Python + Slack Bot – 3

さてリアルタイムでとりあえずうまくいったので、もう少し違うサンプルコードを試してみる。 参考にしたのはこちら。 https://www.fullstackpython.com/blog/build-f …

no image

automated the boring – day 2

今日は簡単なUser認証のプロトタイプといえば恰好はよいが、 パスワードの入力 パスワードの突き合せ パスワードつきあわせの結果によりメッセージを変える name = ‘Mary’ password …

no image

配列のインデックス

インデックスとは配列に対して[]で要素を抜き出す方法である。 マニュアルは以下になる。 Indexing Indexing Routines インデックスの方法としては以下がある。 整数値を使ったイン …

no image

kaggle Titanic Tutorial – 1

KaggleでTitanic tutorialにチャレンジしてみる。 Titanic: Machine Learning from Disaster https://www.kaggle.com/c/ …

no image

Pillowのインストールは成功しているのにエラーが出る

from . import _imaging as core ImportError: DLL load failed: The specified module could not be found …

2018年2月
« 1月   3月 »
 1234
567891011
12131415161718
19202122232425
262728  

side bar top



アーカイブ

カテゴリー