answer.
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
likoan [24]
1 year ago
5

Design a program that asks the user for a series of names (in no particular order). After the final person’s name has been enter

ed, the program should display the name that is first alphabetically and the name that is last alphabetically. For example, if the user enters the names Kristin, Joel, Adam, Beth, Zeb, and Chris, the program would display Adam and Zeb.
Computers and Technology
1 answer:
masya89 [10]1 year ago
8 0

Answer:

size = int(input("How many names will be there? "))

names = []

for _ in range(0, size):

   name = input("Enter a name: ")

   names.append(name)

names.sort()

print(names[0] + " " + names[-1])

Explanation:

* The code is in Python

- Ask the user for the number of the name

- Initialize an empty list that will hold the name entered

- Inside the for loop, get the names and put them in the names array

- When all the names are entered, sort them and print the first and last of the name

You might be interested in
Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number for which a
natali 33 [55]
2 I think because 2 I think is binary I’m sorry if this is wrong
8 0
1 year ago
What is a dashed line showing where a worksheet will be divided between pages when it prints?
barxatty [35]
The answer is A. A split box
7 0
1 year ago
Read 2 more answers
John is researching the job of a quality control inspector. He thinks it would be fun to monitor the production process and test
Evgesh-ka [11]
Near-perfect eyesight and detail perception would be good traits to have. 
6 0
1 year ago
Read 2 more answers
You modify a document that is saved on your computer. Where are the changes stored until you save the document again?
balandron [24]

Answer:

RAM

Explanation:

8 0
2 years ago
Implement a class Product. A product has a name and a price, for example new Product("Toaster", 29.95). Supply methods getName,
soldier1979 [14.2K]

Answer:

class Product{

   private String name;

   private double price;

   public Product(String name, double price) {

       this.name = name;

       this.price = price;

   }

   public String getName() {

       return name;

   }

   public void setName(String name) {

       this.name = name;

   }

   public double getPrice() {

       return price;

   }

   public void setPrice(double price) {

       this.price = price;

   }

}

Explanation:

The class Product is implemented above in Java with the set and get methods as well the constructor.

The ProductDemo program is given below:

public class num9 {

   public static void main(String[] args) {

       Product product1 = new Product("Paties", 4.55);

       Product product2 = new Product ("jamies", 5.99);

       System.out.println("Product 1 is "+product1.getName()+" The price is " +

               ""+product1.getPrice());

       System.out.println("Product 2 is "+product2.getName()+" The price is " +

               ""+product2.getPrice());

}

}

4 0
1 year ago
Read 2 more answers
Other questions:
  • Which data type stores images and audio visual clips?
    15·1 answer
  • The c++ operator _______________ is used to destroy dynamic variables.
    5·1 answer
  • Identify the normalized form of the mantissa in 111.01.
    14·1 answer
  • Assume that processor refers to an object that provides a void method named process that takes no arguments. As it happens, the
    5·1 answer
  • Assign decoded_tweet with user_tweet, replacing any occurrence of 'TTYL' with 'talk to you later'. Sample output with input: 'Go
    14·2 answers
  • Write a function called sum_scores. It should take four arguments, where each argument is the team's score for that quarter. It
    6·1 answer
  • Create a generic class Box with a type parameter that simulates drawing an item at random out of a box. This class could be used
    7·1 answer
  • The elements of an integer-valued array can be initialized so that a[i] == i in a recursive fashion as follows: An array of size
    10·1 answer
  • Pick a 3D game you enjoy or know about. Pick a scene from that game that has at least one character in it and describe the scene
    9·1 answer
  • IANA has primarily been responsible with assigning address blocks to five regional internet registries (RIR). A tech needs to re
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!