Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import socket
import subprocess
import os
import platform
'''these are the three information need to be provide to enter the system'''
print("1. provide address information")
print("2 . provide the system information")
print("3 . provide OS name")
i = int(input("please select one choice "))
'''used if statement make 1,2, or 3 decisions or will give an error'''
if i == 1: ### list of choices
addr = str(input("give the address please >> "))###frist choice
print(socket.getaddrinfo(addr,80, proto=socket.IPPROTO_TCP))
elif i == 2:
print(platform.platform())###second choice
elif i == 3:
print(os.name)###third choice
else:
print("error please select one of the three choices 1,2,or 3")###if there is an error will dispaly this msg