# solution to accept a 9-digit integer representing an unformatted student identification number 

#Solution outputs formatted student identification number as a string 



# this practice gives you a way to show you how to put in the first digit in the code 

print("Enter Student Identification Number:")
phone_number = int(input())

first_digit = phone_number // 10 ** 9
area_code = (phone_number // 10 ** 6) % 1000
prefix  = (phone_number // 10 ** 3) % 1000
line_number = phone_number % 1000

print(f"+{first_digit} - {area_code} - {prefix} - {line_number}")


# this is without the first digit to put in the code 

print("Enter Student Identification Number:")
phone_number = int(input())

area_code = (phone_number // 10 ** 6) % 1000
prefix = (phone_number // 10 ** 4) % 100 
line_number phone_number % 10000

print(f"{area_code}-{prefix}-{line_number}")

# The more zeros the more it will duplicate the numbers from the their place holder

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: