人気の面接質問と回答・オンラインテスト
面接対策、オンラインテスト、チュートリアル、ライブ練習のための学習プラットフォーム

集中型学習パス、模擬テスト、面接向けコンテンツでスキルを伸ばしましょう。

WithoutBook は、分野別の面接質問、オンライン練習テスト、チュートリアル、比較ガイドをひとつのレスポンシブな学習空間にまとめています。

面接準備

模擬試験

ホームページに設定

このページをブックマーク

メールアドレスを登録

Python Coding 面接の質問と回答

質問 1. Write a function to reverse a string.

def reverse_string(input_str):

return input_str[::-1]

Example:

reverse_string('hello')  # Output: 'olleh'

役に立ちましたか? コメントを追加 コメントを見る
 

質問 2. Implement a function to check if a string is a palindrome.

def is_palindrome(input_str):

return input_str == input_str[::-1]

Example:

is_palindrome('radar')  # Output: True

役に立ちましたか? コメントを追加 コメントを見る
 

質問 3. Write a Python program to find the factorial of a number.

def factorial(n):

  return 1 if n == 0 else n * factorial(n-1)

Example:

factorial(5)  # Output: 120

役に立ちましたか? コメントを追加 コメントを見る
 

質問 4. Implement a function to check if a number is prime.

def is_prime(num):

  if num < 2:

  return False

  for i in range(2, int(num**0.5) + 1):

    if num % i == 0:

      return False

   return True

Example:

is_prime(11)  # Output: True

役に立ちましたか? コメントを追加 コメントを見る
 

質問 5. Create a Python class for a basic stack implementation.

class Stack:

  def __init__(self):

    self.items = []

 

  def push(self, item):

    self.items.append(item)

 

  def pop(self):

    return self.items.pop()

 

  def is_empty(self):

    return len(self.items) == 0

Example:

stack = Stack()
stack.push(1)
stack.push(2)
print(stack.pop())  # Output: 2

役に立ちましたか? コメントを追加 コメントを見る
 

ユーザー評価で最も役立つ内容:

著作権 © 2026、WithoutBook。