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
int) You are the head of a division of a big Silicon Valley company and have assigned one of your engineers, Jim, the job of dev
sergeinik [125]

Answer:

Correct option is E

Explanation:

a) 2n^2+2^n operations are required for a text with n words

Thus, number of operations for a text with n=10 words is 2\cdot 10^2+2^{10}=1224 operation

Each operation takes one nanosecond, so we need 1224 nanoseconds for Jim's algorithm

b) If n=50, number of operations required is 2\cdot 50^2+2^{50}\approx 1.12589990681\times 10^{15}

To amount of times required is 1.12589990681\times 10^{15} nanoseconds which is

1125899.90685 seconds (we divided by 10^{9}

As 1$day$=24$hours$=24\times 60$minutes$=24\times 60\times 60$seconds$

The time in seconds, our algortihm runs is \frac{1125899.90685}{24\cdot 60\cdot 60}=13.0312 days

Number of days is {\color{Red} 13.0312}

c) In this case, computing order of number of years is more important than number of years itself

We note that n=100 so that 2(100)^2+2^{100}\approx 1.267650600210\times 10^{30} operation (=time in nanosecond)

Which is 1.267650600210\times 10^{21} seconds

So that the time required is 1.4671881947\times 10^{16} days

Each year comprises of 365 days so the number of years it takes is

\frac{1.4671881947\times 10^{16}}{365}=4.0197\times 10^{13} years

That is, 40.197\times 10^{12}=$Slightly more than $40$ trillion years$

4 0
2 years ago
Select the examples that best demonstrate likely employers for Journalism and Broadcasting workers. Check all that apply.
Delicious77 [7]

Answer:

a radio station

a newspaper

a television network

Explanation:

4 0
1 year ago
Read 2 more answers
c++ Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is c
Ksivusya [100]

<u>Answer:</u>

<em>int fNumber,scndNumber = -1,  </em>

<em>dup = 0; </em>

<em>do { </em>

<em>cin >> fNumber; </em>

<em>if ( scndNumber == -1) { </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>else { </em>

<em>if ( scndNumber == fNumber ) </em>

<em>duplicates++; </em>

<em>else </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>} while(fNumber > 0 );  </em>

<em>cout << dup; </em>

<u>Explanation:</u>

Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>

<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.

4 0
1 year ago
Read 2 more answers
All the employees of Delta Corporation are unable to access the files stored in the server. What do you think is the reason behi
CaHeK987 [17]
C serve crash hope this is correct
5 0
1 year ago
Which decimal value (base 10) is equal to the binary number 1012?
GaryK [48]

Answer:

The decimal value of 101₂² base 2 = 25 base 10

Explanation:

The number 101₂² in decimal value is found as follows;

101₂ × 101₂ = 101₂ + 0₂ + 10100₂

We note that in 101 + 10100 the resultant 2 in the hundred position will have to be converted to a zero while carrying over 1 to the thousand position to give;

101₂ + 0₂ + 10100₂ = 11001₂

Therefore;

101₂² =  11001₂

We now convert the result of the square of the base 2 number, 101², which is 11001₂ to base 10 as follows;

Therefore converting 11001₂ to base 10 gives;

11001₂= 1 × 2⁴ + 1 × 2³ + 0 × 2² + 0 × 2 ¹ + 1 × 2⁰

Which gives;

16 + 8 + 0 + 0 + 1 = 25₁₀.

7 0
1 year ago
Other questions:
  • Write a loop that reads strings from standard input, where the string is either duck or goose. the loop terminates when goose is
    7·1 answer
  • A(n) ______close to a cover letter leads to more interviews because you are contacting the employer. a. passive b. lengthy c. ac
    11·2 answers
  • The final step of the DHCP Discovery process is known as...
    8·1 answer
  • Which feature of Badoo helped members make their profile more prominent?
    14·1 answer
  • . Write a function wordscramble that will receive a word in a string as an input argument. It will then randomly scramble the le
    10·1 answer
  • Assume that name has been declared suitably for storing names (like "Misha", "Emily" and "Sofia") Write some code that reads a v
    10·1 answer
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • Your company has decided to replace several hundred hard drives. It would like to donate the old hard drives to a local school s
    11·1 answer
  • When do images or graphics in Microsoft Word hurt the document rather than help
    9·1 answer
  • Identify the tips to create a well-designed digital portfolio.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!