Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What does Cython do?
Think about optimizing Python code.
How do you declare a function in Cython?
Remember the keyword for dual access.
What is the main purpose of Cython?
Focus on what Cython does to Python code.
Cython allows using which keyword to define functions?
What keyword indicates dual access to functions?
Write a Cython function that calculates the factorial of a number, using type declarations for the parameter and return value. Compile it and explain how you would do that.
Consider both the logic of factorial and Cython syntax.
Create a Cython program that uses a loop to sum integers from 1 to N, where N is an int type. Measure the improvement in speed compared to pure Python.
Utilize the timeit module for measuring performance.
5 more questions in this section. Enroll free to practise them all.
Enroll free