>
Appendix A
About
This section is included to assist the students to perform the activities present in the book. It includes detailed steps that are to be performed by the students to complete and achieve the objectives of the book.
Chapter 1: Introducing Python
Activity 1: Working with the Python Shell
Solution:
>>> print("Happy birthday")
Happy birthday
>>> 17 + 35 * 2
87
>>> print(1, 2, 3, 4, 5, 6, 7, 8, 9)
1 2 3 4 5 6 7 8 9
>>>
Activity 2: Running Simple Python Scripts
Solution:
import sys
print("*---------------------------------")
print("|", "First name: ", sys.argv[1])
print("|", "Second name: ", sys.argv[2])
print("*---------------------------------")
Activity 3: Using Variables and Assign Statements
Solution:
- Open ...
Get Python Fundamentals now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.