PYTHON ESSENTIALS-1
MODULE 2 :
1. Break the output line
2. The arguments name specified along with its value
3. 20.12E8
4. Binary
5. Performs exponentiation
6. Is equal to 1.0
7. The ** operator uses right sided binding , the right argument of the
% operator cannot be zero.
8. 0
9. TRUE , true
10. Any number of arguments (including zero)
11. 21
12. 24
13. The code will cause runtime error.
14. The code will cause runtime error.
15. 1
16. 333333
17. 111
18. The snippet will cause an execution error.
19. 17
20. 6.
MODULE-1:
1. A low level programming language consisting of binary digits/bits
that the computer reads and understands.
2. An alphabet ,alexis , a syntax , and semantics.
3. A source file
4. It tends to be faster than interpretation , the code is directly
converted into machine code executable by the processor.
5. It’s a text file that contains instructions which make up a python
program.
6. Python is a good choice for creating and executing tests for
applications , python is free , open-source , and multiplatform.
7. It’s a default implementation of python written in c language.
8. A console.
9. The program will output Hello! To the screen.
10. The program will generate an error message on the screen.
MODULE-3:
1. ==
2. True
3. Two
4. One
5. Two
6. Three
7. Four
8. True
9. 2
10. 1
11. [2]
12. Doesn’t change the list.
13. 4
14. Nums and vals are of the same length ,nums and vals refer to
the same list.
15. Nums and vals are two different lists ,nums is longer than vals.
16. [3,2,1]
17. [1,1,1,1,2,3]
18. Three
19. 6
20. The snippet will cause a run time error.
MODULE-4:
1. def fun():
2. may be invoked with exactly one argument , may be invoked
without any argument.
3. Comes with python , and is an integral part of python.
4. They can be indexed and sliced like lists.
5. 6
6. 4
7. Print(k[0])
8. Is erroneous
9. Will output 16
10. Def fun(a=0,b=0):
11. The none value can be assigned to varaibles, the none value
can be compared with variables.
12. The code will cause a runtime error.
13. 4
14. 21
15. Is illegal.
16. No output , the snippet is erroneous.
17. 9
18. 4
19. Two
20. 2
21. The code that follows the except statement will be executed if
the code in the try clause runs into an error , if you suspect that a
snippet may raise an exception place it in the try block.
22. Very very bad input…
PYTHON ESSENTIALS 1 (PE1) COURSE FINAL EXAM :
1. [1,1,1,2]
2. Its position within the argument list.
3. Nums and vals are different names of the same list ,nums has the
same length as vals.
4. !=
5. Will cause a runtime error.
6. Is equal to 0.
7. Is erroneous.
8. False.
9. in , for
10. [0,1,4,9]
11. 112
12. 01
13. 2
14. Nums and vals have same length.
15. 0
16. 63
17. asepbsepc
18. 0.2
19. Is illegal.
20. 2.0
21. One
22. Zero
23. Fun(b=0,a=0) ,fun(0,1,2)
24. 0
25. The snippet will enter the infinite loop , printing one star per
line.
26. 4
27. 01
28. 21
29. 4
30. Three.
31. 0.0
32. The program will cause a syntax error exception
33. The program will cause a value error exception.
34. A and F
35. The program will cause a syntax error exception