Question: Name: Worksheet 2 : Types CSCI 1 2 8 What is the difference between the / and / / operators? What are the types returned,

Name:
Worksheet 2: Types
CSCI 128
What is the difference between the / and // operators? What are the types returned, and why would you use one over the other? Provide an example where the value would change depending on the operator used.
Consider the code below:
firstWord = "CSCI128"
secondWord = "Rocks!"
print(firstWord + secondWord)
(a) What is printed in the code above?
(b) Provide two ways a space could be added between the printed words by modifying line 3.
(c) If secondWord was assigned the integer value 1 on line 2, what would be printed to the terminal? If this causes an error, how could we fix it?
 Name: Worksheet 2: Types CSCI 128 What is the difference between

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!