1. You can think of a variable as a ….
2. In the following code, can you point out the variables?
3. In the following variable declaration, what 'type' of variable is 'name'?
4. What variable type (data type) would telephone number be?
5. In languages like VB.Net you would declare a variable like this: Dim age as integer = 20. In Python this would be:
6. Which items on the following list are NOT valid data types?
7. Run or trace the logic of this program. It should give us 16 but it gives us 20 instead. Why?
8. The following code would come up with an error. Can you say why?
9. Another variable type you may have learned about (usually decimal numbers) is F _ _ _ _
10. _______________data types store only TRUE or FALSE values
11. If x = 2, and y = 3, and z=x+x, what would be printed with the command: print(z)
12. In the following code, the equal sign is assigning a particular value to
x. so that the final value of x will always be 3.
13. Analyse the slightly peculiar lines of code below. What is the final output?
14. Read the following excerpt / definition of constants below and decide whether it is true or false
15. If a constant was a bag in which you stored some books, then …
16. Python convention is that constants are written in ______________ and underscores if there is more than one word.
17. In a video game, gravity and score are going to be used to completed the mechanics and functionality of the game. Which statement is true?
18. In Python the "=" sign is used for _____________ and the "==" sign (double equals) means 'is equal to'
19. The following python code is for finding the area of a circle. Why is PI a constant?
20. Note that in the following line the 'radius' variable is turned into a float data type. Why?
21. Why does the code stop at print(x)?
22. In the following example, x is a local variable.
23. In the following example 'username' is a local variable but can be accessed outside of its function because …
24. An iphone app about recipies has the fields: flavour,weight(in KG), quantity in stock, and Gluten-Free?. What data types would be best suited?
25. One advantage of declaring a constant is that …
26. In reference to the image below, fill in the blanks for 1 to 5.
27. In what situation might you use the 'char' data type to store data?
28. In which of the following situations might you use a Boolean data type?