Write SQL query to solve given problem: List the course IDs and levels of person IDs from 40 to 50.. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id BETWEEN 40 AND 50