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
Type your response in the box. Imagine you purchased a new computer and you plan to install one operating system and a few appli
faltersainse [42]

Answer:

Yes

Explanation:

As long as they were legally copied

5 0
2 years ago
Read 2 more answers
Write an expression that will cause the following code to print "Equal" if the value of sensorReading is "close enough" to targe
natali 33 [55]

Answer:

The C++ code is given below with appropriate comments

Explanation:

//Remove this header file if not using visual studio.

#include "stdafx.h"

//Include the required header files.

#include <iostream>

//Use for maths function.

#include <cmath>

using namespace std;

//Define main function

int main()

{

      // Define the variables

      double targetValue = 0.3333;

      double sensorReading = 0.0;

      //Perform the opeartion.

      sensorReading = 1.0 / 3.0;

      // Get the absolute floating point value and

      // Check up to 4 digits.

      if (fabs(sensorReading - targetValue) < 1E-4)

      {

             //Print equal if the values are close enough.

             cout << "Equal" << endl;

      }

      else

      {

             //Print not equal if the values are not                  

             //close enough.

             cout << "Not equal" << endl;

      }

      system("pause");

      //Return the value 0.

      return 0;

}

5 0
3 years ago
A job posting is the best way to find out what _____ are required for a position.A.aptitudes B.hard skills C.soft skills D.dress
GREYUIT [131]
C. hard skills as they are well defined and thus can be listed down on something like a resume or cv
7 0
4 years ago
Read 2 more answers
Given the string variable address, write an expression that returns the position of the first occurrence of the string "avenue"
MrMuchimi
String temp;

for i = 0 to Address.length - 6 do 
begin
     temp = copy(address, i, i + 6) //returns a substring of a string beginning at
                                                     //i and ending at i + 6 
     if temp = 'Avenue' then
          return i;
   
end;
8 0
3 years ago
Question #1
Evgen [1.6K]

Answer:

Pseudocode and flowchart.

Explanation:

I just got it correct.

8 0
3 years ago
Other questions:
  • Write a php program that checks the elements of a string array named $passwords. use regular expressions to test whether each el
    8·1 answer
  • If I gain a rank and go under the points that the rank coust do I lose the rank
    8·2 answers
  • Max Weber's concept of ________ implies that, in conducting research, social scientists must try to understand others' view of r
    14·2 answers
  • Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the
    10·1 answer
  • Examine the following algorithm.
    9·1 answer
  • Susan's monthly goal to open five new customer
    10·1 answer
  • For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions)
    13·1 answer
  • Networks, partnerships, and joint ventures are an example of
    7·1 answer
  • Question # 2 Multiple Choice Which finger presses the H key on the keyboard? index finger on the right hand index finger on the
    11·1 answer
  • Which of the following includes premium content you must pay to use?<br> On word
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!