Question: 1. Download printPractice.py from Bb Lab 3. Modify sample script printPractice.py, so that it prints the same statement four times, but using four distinct techniqueshard-coding,

1. Download printPractice.py from Bb Lab 3. Modify sample script printPractice.py, so that it prints the same statement four times, but using four distinct techniqueshard-coding, commas, concatenation, and string formatting. The hardcoding is already done. The other three techniques have been started but they contain mistakes. These techniques should each use all three of the provided variables. Once the mistakes have been corrected, run the script to make sure that it prints the statement identically four times: Found 12 lights in the 5 mi. buffer and 20 intersections. Found 12 lights in the 5 mi. buffer and 20 intersections. Found 12 lights in the 5 mi. buffer and 20 intersections. Found 12 lights in the 5 mi. buffer and 20 intersections.

2. These Python statements use string methods and operations involving the variable LCS_ID. Determine if each Python statement is True or False. The string variable called LCS_ID is assigned as follows: LCS_ID = "0017238" (a) '17' in LCS_ID (b) LCS_ID.isdigit() (c) LCS_ID.lstrip('0') == '17238' (d) LCS_ID.zfi ll(10) == '10101010' (e) LCS_ID + '10' == 17248 (f) LCS_ID[6] == '3' (g) len(LCS_ID) == 7 (h) LCS_ID[0:7] == '0017238' (i) int(LCS_ID) + 10 == 17248 (j) LCS_ID != 17238

3. Type the following lines of code in the Interactive Window. Each line of code should raise a built-in exception. Report the name of the built-in exception that is raised (The first row is done for you). GISC 3420 Geospatial Software II Python code Exception name class = 'combustibles' SyntaxError 'five' + 6 Min int('fi ve') 5/0 input file = 'park.shp' Explain why receiving such exception name.

4. Write a script named times.py that finds the product of two input integers and prints the results. Start by opening add_version2.py, modifying the last two lines and saving the file with the name times.py. An asterisk is used as the multiplication operator in Python, so youll use c = a * b to multiply. Also change the comment on line 1 to reflect the modified functionality. Run the script using two integer arguments to check that it works. The example below shows the expected behavior. Check your results against this example. Example input: 2 3 Example output: >>> The product is 6.

IS THERE A WAY TO UPLOAD THE FILES GIVEN TO ME BY MY PROFFESOR???

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!