# Write an expression whose value is the result of converting the str value associated with s to an int value. So if s were associated with “41” then the resulting int would be 41.

## 1.Using Python 3.4 Write an expression whose value is the result of converting the str value associated with s to an int value. So if s were associated with “41” then the resulting int would be 41.

### Elevate Your Writing with Our Free Writing Tools!

Did you know that we provide a free essay and speech generator, plagiarism checker, summarizer, paraphraser, and other writing tools for free?

## 2.Given three int variables that have been given values, areaCode, exchange, and lastFour, write a string expression whose value is the string equivalent of each these variables joined by a single hyphen (-) So if areaCode, exchange, and lastFour, had the values 800, 555, and 1212, the expression’s value would be “800-555-1212”. Alternatively, if areaCode, exchange, and lastFour, had the values 212, 867 and 5309 the expression’s value would be “212-867-5309”.

Answer: str(areaCode) + ‘-‘ + str(exchange) + ‘-‘ + str(lastFour)

## 6. Given four variables that have been given integer values, octet1, octet2, octet3, and octet4, write a string expression whose value is the string equivalent of each these variables joined by a single period (.) So if octet1, octet2, octet3, and octet4 had the values 129, 42, 26, and 212 the expression’s value would be “129.42.26.212”. Alternatively, if octet1, octet2, octet3, and octet4 had the values 192, 168, 1and 44 the expression’s value would be “192.168.1.44”.

Answer: str(octet1) + “.” + str(octet2) + “.” + str(octet3) + “.” + str(octet4)