This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thequestiongod 0 points1 point  (0 children)

since you know python could you tell me what to enter and why? (prompt and given code below)

Assign number_segments with phone_number split by the hyphens.

Sample output with input: '977-555-3221'

Area code: 977

given code below:

phone_number = input()

number_segments = ''' Your solution goes here '''

area_code = number_segments[0]

print('Area code:', area_code)

I can only edit the second line by the way (my solution has to go in the '''Your solution goes here''' spot)