# Python Exam ### <sub><sub></div>*Time: 2 Hours*</sub></sub><sub><sub><div class=pull-right>Total: 50</div></sub></sub> <br> ### <sub><div class=pull-left>Answer All of the questions below. [Theory]</div></sub></sub><sub><sub><div class=pull-right>Total: 10</div></sub> <br> 1. How can we access one file's code to another? Explain with examples. 1. What is packaging in programming? 1. What is the benefit of using packages in a project file system? 1. What can we do with the turtle module in python? 1. What is the difference between *penup* and *pendown*? 1. `turtle.forward(300)` what does this code line do? 1. How can we identify a recursive method? 1. How can we speed up the graphics drawings in turtle? 1. If you want to generate random numbers between specific ranges, what random function should you be using? 1. What’s the difference between `random.random()`, `random.randint()` and `random.choice()`. <br> ### <sub><div class=pull-left>Answer All of the questions below. [Coding]</div></sub></sub><sub><sub><div class=pull-right>Total: 40</div></sub> <br> 1. Design a class with appropriate methods that can randomly generate the next leader of this list. *names = ['Hitlar', 'Putin', 'Donald', 'Biden', 'Modi', 'Stalin']* 1. Using appropriate modules, design a calculator that can do the following arithmetic and converting operations. *Arithmetics: Sum, Sub, Multi, Div, Floor, Ceiling, Modulus. Converter: String to integer, Kg to Lb, Lb to Kg, feet to cm.* 1. Design 4 square shapes objects using python turtle modules. 1. Draw 2 stars with black background and white filling.