Question
use python IDEL
Question 17 5 pts Problem 5 Write a program. You have been hired as a programmer and a Unix administrator asked you to check
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code:

mainserver=[]
server1=[]
server2=[]
n=int(input("please enter the no of user for main server"))# input of no of users in server
for i in range(0,n):
    user1=input("enter user name")
    user1=user1.strip().lower()#removing spaces and converting to lower case
    mainserver.append(user1)
n1=int(input("please enter the no of user for server 1"))# input of no of users in server
for i in range(0,n1):
    user1=input("enter user name")
    user1=user1.strip().lower()#removing spaces and converting to lower case
    server1.append(user1)
n2=int(input("please enter the no of user for server 1"))# input of no of users in server
for i in range(0,n2):
    user1=input("enter user name")
    user1=user1.strip().lower()#removing spaces and converting to lower case
    server2.append(user1)
mainserver=set(mainserver)#converting into set
server1=set(server1)#converting into set
server2=set(server2)#converting into set
temp1=mainserver.intersection(server2,server1)#intersecting all three sets and storing to temp
print("users logined to all server",temp1,sep=" = ")


temp3=server1.union(server2)#union server1 and server 2 in temp3
temp2=mainserver.difference(temp3)#substracting temp3 from mainserver and storing to temp2
print("users logined to only mainserver",temp2,sep=" = ")


Output in idle:

please enter the no of user for main server5 enter user namealex enter user namelinda enter user name kyrill enter user namea

Add a comment
Know the answer?
Add Answer to:
use python IDEL Question 17 5 pts Problem 5 Write a program. You have been hired...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You have been hired by NY state lottery administrator to write a program to develop a...

    You have been hired by NY state lottery administrator to write a program to develop a Combinations and Permutations Calculator. Refer to this link to check if your calculations are correct: https://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.htmlYour program should ask user the following four questions:a.How many different numbers are possible?i.e. nb.How many numbers are used?i.e. rc.Is the order of the numbers important?d.Can you repeat a number? If the Order of the numbers is important and numbers can be repeated, use this formula: n^r If the...

  • please help in python Suppose you have been tasked to write a Python program that will...

    please help in python Suppose you have been tasked to write a Python program that will accomplish the following tasks as related to the daily gas prices for the past year (365 days): • display the five (5) lowest gas prices for the year • display the five (5) highest gas prices for the year • allow the user to search for a specific gas price in the list; you should display a message for whether or not you found...

  • You have been hired as database administrator for Athabasca University and the computing services director asked you to...

    You have been hired as database administrator for Athabasca University and the computing services director asked you to tune the following database that is too slow for query processing. The database has two relations: Professor(sin, prof_name, office_no, age, gender, specialty, dept_did) Department(did, dept_name, budget, nbr_programs, chair_sin) After examining the application you found that the following queries are the five most common queries in the workload for this university application and that all are roughly equivalent in frequency and importance: o...

  • You have been asked to write a program to grade several multiple-choice exams. The exam has...

    You have been asked to write a program to grade several multiple-choice exams. The exam has 20 questions, each answered with a letter in the range of ‘a’ through ‘f’. The answers key is declared in the program as constant of type string. An example of answer key is “abcdefabcdefabcdefab”. Your program should work for any other answer key. The program should first ask users for the number of students to be graded. Then it should have a while loop...

  • The project description As a programmer; you have been asked to write a program for a Hospital wi...

    program Java oop The project description As a programmer; you have been asked to write a program for a Hospital with the following The Hospital has several employees and each one of them has an ID, name, address, mobile number, email and salary. . The employees are divided into Administration staff: who have in addition to the previous information their position. Nurse: who have their rank and specialty stored in addition to the previous o o Doctor: who have the...

  • program Java oop The project description As a programmer; you have been asked to write a...

    program Java oop The project description As a programmer; you have been asked to write a program for a Hospital with the following The Hospital has several employees and each one of them has an ID, name, address, mobile number, email and salary. . The employees are divided into Administration staff: who have in addition to the previous information their position. Nurse: who have their rank and specialty stored in addition to the previous o o Doctor: who have the...

  • TASK Read the Regional gardens case study document before attempting this assignment. Background: You have been...

    TASK Read the Regional gardens case study document before attempting this assignment. Background: You have been employed by Regional Gardens as their first Chief Information Officer (CIO). You have been tasked by the Board to conduct a review of the company’s risks and start to deploy security policies to protect their data and resources. You are concerned that the company has no existing contingency plans in case of a disaster. The Board indicated that some of their basic requirements for...

  • (2 bookmarks) In JAVA You have been asked to write a program that can manage candidates...

    (2 bookmarks) In JAVA You have been asked to write a program that can manage candidates for an upcoming election. This program needs to allow the user to enter candidates and then record votes as they come in and then calculate results and determine the winner. This program will have three classes: Candidate, Results and ElectionApp Candidate Class: This class records the information for each candidate that is running for office. Instance variables: first name last name office they are...

  • USE PYTHON ONLY Please write a Python program to let you or the user play the...

    USE PYTHON ONLY Please write a Python program to let you or the user play the game of rolling 2 dice and win/lose money. Initially, you have 100 dollars in your account, and the dealer also has 100 dollars in his/her account. You would be asked to enter a bet to start the game. If your bet is zero, the game would be stopped immediately. Otherwise, dealer would roll 2 dice and get a number from ( random.randint(1, 6) +...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT