# Pythonの基礎 (Data Science & ML) > 変数、データ型、制御構造、関数、モジュール、例外 - 25 面接問題 - Junior - [面接問題: Data Science & ML](https://sharpskill.dev/ja/technologies/data-science/interview-questions.md) ## 1. Pythonにおける変数とは何ですか? **回答** Pythonにおける変数は、値を含むメモリ位置を参照する名前です。他の言語と異なり、Pythonは動的型付けを使用します。変数の型は代入時に自動的に決定されます。型を明示的に宣言する必要はありません。 ## 2. Pythonで値3.14の型は何ですか? **回答** Pythonでは、3.14は浮動小数点数なので、float型です。整数(小数なし)はint型、小数部分を持つ数値は自動的にfloatとして扱われます。type()関数で値の型を確認できます。 ## 3. Pythonで文字列"42"を整数に変換するにはどうすればよいですか? **回答** int()関数は、数値を表す文字列を整数に変換します。この操作はキャストまたは型変換と呼ばれます。文字列が有効な数値を表していない場合、ValueErrorが発生します。小数用のfloat()や文字列用のstr()もあります。 ## さらに22問利用可能 - Pythonにおけるlistとtupleの違いは何ですか? - Pythonで式bool("")は何を返しますか? 無料で登録: https://sharpskill.dev/ja/login ## その他のData Science & ML面接トピック - [Pythonオブジェクト指向プログラミング](https://sharpskill.dev/ja/technologies/data-science/interview-questions/python-oop.md): 20問, Junior - [Pythonのデータ構造](https://sharpskill.dev/ja/technologies/data-science/interview-questions/python-data-structures.md): 20問, Junior - [Git の基礎](https://sharpskill.dev/ja/technologies/data-science/interview-questions/git-fundamentals.md): 18問, Junior - [SQLの基礎](https://sharpskill.dev/ja/technologies/data-science/interview-questions/sql-basics.md): 20問, Junior - [NumPyの基礎](https://sharpskill.dev/ja/technologies/data-science/interview-questions/numpy-fundamentals.md): 22問, Junior - [Pandasの基礎](https://sharpskill.dev/ja/technologies/data-science/interview-questions/pandas-basics.md): 22問, Junior - [Jupyter & Google Colab](https://sharpskill.dev/ja/technologies/data-science/interview-questions/jupyter-colab.md): 16問, Junior - [SQL Joinsと高度なクエリ](https://sharpskill.dev/ja/technologies/data-science/interview-questions/sql-joins-advanced.md): 22問, Mid-Level - [Pandas応用](https://sharpskill.dev/ja/technologies/data-science/interview-questions/pandas-advanced.md): 24問, Mid-Level - [Matplotlib & Seabornによる可視化](https://sharpskill.dev/ja/technologies/data-science/interview-questions/matplotlib-seaborn.md): 20問, Mid-Level - [Plotlyによるインタラクティブな可視化](https://sharpskill.dev/ja/technologies/data-science/interview-questions/plotly-interactive.md): 18問, Mid-Level - [記述統計](https://sharpskill.dev/ja/technologies/data-science/interview-questions/statistics-descriptive.md): 20問, Mid-Level - [推測統計学](https://sharpskill.dev/ja/technologies/data-science/interview-questions/statistics-inferential.md): 24問, Mid-Level - [Web Scraping](https://sharpskill.dev/ja/technologies/data-science/interview-questions/web-scraping.md): 18問, Mid-Level - [BigQuery & Cloud Data](https://sharpskill.dev/ja/technologies/data-science/interview-questions/bigquery-cloud.md): 18問, Mid-Level - [Feature Engineering](https://sharpskill.dev/ja/technologies/data-science/interview-questions/feature-engineering.md): 22問, Mid-Level - [教師あり機械学習:回帰](https://sharpskill.dev/ja/technologies/data-science/interview-questions/ml-supervised-regression.md): 24問, Mid-Level - [教師あり機械学習:分類](https://sharpskill.dev/ja/technologies/data-science/interview-questions/ml-supervised-classification.md): 24問, Mid-Level - [決定木とアンサンブル](https://sharpskill.dev/ja/technologies/data-science/interview-questions/ml-trees-ensembles.md): 24問, Mid-Level - [教師なしML](https://sharpskill.dev/ja/technologies/data-science/interview-questions/ml-unsupervised.md): 22問, Mid-Level - [MLパイプラインと検証](https://sharpskill.dev/ja/technologies/data-science/interview-questions/ml-pipelines-validation.md): 22問, Mid-Level - [時系列と予測](https://sharpskill.dev/ja/technologies/data-science/interview-questions/time-series-forecasting.md): 22問, Mid-Level - [Deep Learningの基礎](https://sharpskill.dev/ja/technologies/data-science/interview-questions/deep-learning-fundamentals.md): 24問, Senior - [TensorFlow & Keras](https://sharpskill.dev/ja/technologies/data-science/interview-questions/tensorflow-keras.md): 22問, Senior - [CNN と画像分類](https://sharpskill.dev/ja/technologies/data-science/interview-questions/cnn-image-classification.md): 24問, Senior - [RNNとシーケンス](https://sharpskill.dev/ja/technologies/data-science/interview-questions/rnn-sequences.md): 22問, Senior - [TransformersとAttention](https://sharpskill.dev/ja/technologies/data-science/interview-questions/transformers-attention.md): 24問, Senior - [NLPとHugging Face](https://sharpskill.dev/ja/technologies/data-science/interview-questions/nlp-huggingface.md): 24問, Senior - [GenAIとLangChain](https://sharpskill.dev/ja/technologies/data-science/interview-questions/genai-langchain.md): 24問, Senior - [MLOps とデプロイ](https://sharpskill.dev/ja/technologies/data-science/interview-questions/mlops-deployment.md): 24問, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ja/technologies/data-science/interview-questions/python-basics