Question

PYTHON 3: At a university, each student is assigned a system login name, which the student...

PYTHON 3: At a university, each student is assigned a system login name, which the student us

to log into the campus computer system As part of your internship with the

university's Information Technology department, you have been asked to write

the code that generates system login names for students. You will use the

following algorithm to generate a login name:

1) Get the first 3 characters of the student's first name

2) Get the first 2 characters of the student's last name.

3) Get the last four digits of the student's ID number

For example, if a student's name is Earl Boykins and his ID number is 15965425 then his login name would be EarBo5425

0 0
Add a comment Improve this question Transcribed image text
Answer #1

firstName = input("Enter the first name:")
lastName = input("Enter the last name:")
idNumber = int(input("Enter the ID number:"))
loginName = firstName[:3]+lastName[:2]+str(idNumber%10000)
print(loginName)

Output:

$python3 main.py
Enter the first name:Earl 
Enter the last name:Boykins 
Enter the ID number:15965425 
EarBo5425
Add a comment
Know the answer?
Add Answer to:
PYTHON 3: At a university, each student is assigned a system login name, which the student...
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
  • Program in IDLE: At a university, each student is assigned a system login name, which the...

    Program in IDLE: At a university, each student is assigned a system login name, which the student uses to log into the campus computer system. As part of your internship with the university's Information Technology department, you have been asked to write the code that generates system login names for students. You will use the following algorithm to generate a login name: 1) Get the first 3 characters of the student's first name. 2) Get the first 2 characters of...

  • Lab: User login system (python) Create a user login system. Your code should do the following:...

    Lab: User login system (python) Create a user login system. Your code should do the following: 1.Load your user database from “UD.txt” (USE THE EXACT FILE NAME, file is given in the folder) 2.Display “Login or create a new user? Select L to login, select C to create new user.” 3. If wrong selection is entered, take the user back to step 2. 4. If the user entered “L”, display “Please enter your user name and hit enter” 5. Check...

  • You will be developing an Advising Scheduling Management System (ASMS) that can be used managing the advising appointments for Salisbury University professors and their advisees (students). ASMS shoul...

    You will be developing an Advising Scheduling Management System (ASMS) that can be used managing the advising appointments for Salisbury University professors and their advisees (students). ASMS should have the following functionalities: - There are three kinds of users: professor, student and admin. When ASMS starts, a login screen asks user which kinds of users and then asks user id and password. If id or password are incorrect, issue a warning and redisplay the login screen. - When an admin...

  • Use C++ to create a class called Student, which represents the students of a university. A...

    Use C++ to create a class called Student, which represents the students of a university. A student is defined with the following attributes: id number (int), first name (string), last name (string), date of birth (string), address (string). and telephone (area code (int) and 7-digit telephone number(string). The member functions of the class Student must perform the following operations: Return the id numb Return the first name of the student Modify the first name of the student. . Return the...

  • Create Datasets for the ABC University Accommodation Office using the information below.This is a list of...

    Create Datasets for the ABC University Accommodation Office using the information below.This is a list of all the datasets and data attributes that the Office needs to function. For example, a STUDENT dataset containing StudentIDNumber, StudentFirstName, etc Scenario - ABC University Accommodation Office (Student Housing) The director of the ABC University Accommodation Office requires you to design a database to assist with the administration of the office and the renting of residences to students. The requirements collection and analysis phase...

  • Write the code to maintain a list of student records. The main flow of your program...

    Write the code to maintain a list of student records. The main flow of your program should be to read all information from file(s) and place it in arrays, loop and do stuff with the records (e.g., add, update, look up, etc.), before exiting optionally write the new information back to the file(s) before exiting. Please note the files are only accessed at the beginning and the end, do not change the files during the "do stuff loop" (unless you...

  • Write this code on python 3 only. Suppose class Student represents information about students in a...

    Write this code on python 3 only. Suppose class Student represents information about students in a course. Each student has a name and a list of test scores. The Student class should allow the user to view a student's name, view a test score at a given position, view the highest test score, view the average test score, and obtain a string representation of the student's information. When a Student object is created, the user supplies the student's name and...

  • Create a java class for an object called Student which contains the following private attributes: a...

    Create a java class for an object called Student which contains the following private attributes: a given name (String), a surname (family name) (String), a student ID number (an 8 digit number, String or int) which does not begin with 0. There should be a constructor that accepts two name parameters (given and family names) and an overloaded constructor accepting two name parameters and a student number. The constructor taking two parameters should assign a random number of 8 digits....

  • Write a java code : Student ID at University is composed of year of admission and...

    Write a java code : Student ID at University is composed of year of admission and students number. we aim to implement a structure that improves operations of inserting and searching for a student. To enhance these operations, we will build a tree of linked lists (TreeOfLists) to combine advantages of both structures. Each node in this tree contains a linked list of all students who were admitted in that year. Each node in the linked list represents a student(id,...

  • Write a Python program to create userids: You work for a small company that keeps the...

    Write a Python program to create userids: You work for a small company that keeps the following information about its clients: • first name • last name • a user code assigned by your company. The information is stored in a file clients.txt with the information for each client on one line (last name first), with commas between the parts. In the clients.txt file is: Jones, Sally,00345 Lin,Nenya,00548 Fule,A,00000 Your job is to create a program assign usernames for a...

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