File size: 702 Bytes
81bc0f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# app/questions.py

# List of interview questions
questions = [
    "What is your experience with Python?",
    "Can you explain the concept of OOP?",
    "Describe a time you faced a challenge and how you overcame it.",
    "What are your strengths and weaknesses?",
    "How do you handle working under pressure?",
    "What are your career goals in the next five years?"
]

# Function to get a question based on an index or randomly
def get_question(index=None):
    if index is not None and 0 <= index < len(questions):
        return questions[index]
    else:
        return "Invalid question index."

# Option to get the next question from the list
def get_all_questions():
    return questions