1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vitek1552 [10]
3 years ago
9

Write a program code to accept the names of 3 users and generate a user name as shown in the example. Accept the name of 3 user

in the format – Firstname Last name (eg. Anan Gupta). Select the first 3 characters from the first name, add # and then add last 3 characters of the last name. Display the newly generated user name along with the names that were input.
Computers and Technology
1 answer:
Nikitich [7]3 years ago
7 0

Answer:

Explanation:

The following code is written in Python and is a function that loops three times asking for the last name and first name. Then it uses this information to create a username. Finally, each of the names and usernames is printed on the screen.

def userName():

   for x in range(3):

       last_name = input("What is your last name: ")

       first_name = input("What is your first name: ")

       username = first_name[:3] + "#" + last_name[-3:]

       print(last_name + ", " + first_name)

       print(username)

You might be interested in
A binary search can be performed only on ____.
11Alexandr11 [23.1K]
A binary search can be performed only on a comparable lists
3 0
3 years ago
Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A and Host B each send a UDP segment to Ho
Ann [662]

Answer:

Yes, both of these segments (A and B) will be directed to the same socket at Host C .

Explanation:

Suppose both Host A and Host B each send a UDP segment to Host C with destination port number 6789, surely , both of these segments will be directed to the same socket at Host C .

Reason being that,  the operating system will provide the process with the IP details to distinguish between the individual segments arriving at host C- for each of the segments (A and B) recieved at Host C.

5 0
3 years ago
The expression 10,785(1.0275)x represents the amount of money in an investment account with interest that compounds annually for
Kamila [148]

E

According to the question,

The amount of investment money is $10,785 and the rate of interest is 1.0275%. The amount of money will be multiplied with the rate of interest and the year.

To get future value of the investment it will be like

FV = PV(1+i)x

Therefore , Future value = 10,785(1.0275)x

8 0
3 years ago
Read 2 more answers
Waterpower was first harvested by ancient societies using
Maslowich
Not sure why this question is in Computers and Technology...

Answer should be c.
6 0
3 years ago
Which statement is false? Classes are reusable software components. A class is to an object as a blueprint is to a house. Perfor
Korolek [52]

Answer:

The last option i.e "A class is an instance of its object" is the correct answer of this question.

Explanation:

A class is a collection of variable and method . The class is the blueprint of the object that means class is physical space entity and object is a runtime space entity.It is the the reusability feature of the programming component.

Following are the  syntax to declare any class.

                     Class classname

<u>For Example</u>: class test1

With the help of class we can achieve the inheritance, encapsulation and abstraction etc.

All the other options except the last one are correct option. Because option(1), option(2) and option(3) follow the property of class and object .  that's why last option is False.

4 0
3 years ago
Other questions:
  • Which feature of Microsoft power point allowed you to put a picture in every slide
    8·1 answer
  • Which option best describes the cheapest way to file your federal income taxes?
    5·1 answer
  • What is the result when you run the following program?
    12·1 answer
  • Swiping and pinching are graphical user interface (gui) _____________.
    7·2 answers
  • What is a feature of readable code?
    12·2 answers
  • Running the Disk Cleanup utility is a quick way to ________. Group of answer choices defrag your hard drive remove spyware progr
    10·1 answer
  • What is the BCC feature used for?
    12·2 answers
  • ANSWER QUICKLY PLEASE
    7·1 answer
  • What is the codebook?
    6·1 answer
  • Discuss the ways you can perform to prevent your computer/device and its data/contents from being stolen. Define two-facto authe
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!