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
swat32
3 years ago
12

Write a function named joinStrings() that keeps asking the user for words and joins them together. Each word should start with a

n uppercase letter and the rest of letters in the word should be lowercase. All the words should be separated by a space. When the user decides to stop, return the joined string
Computers and Technology
1 answer:
Tamiku [17]3 years ago
4 0

Answer:

* The code is in Python

def joinStrings():

   join = ""

   while True:

       str = input("Enter a word or Q to stop: ")

       if str == "Q":

           break

       else:

           join = join + " " + str

   return join

print(joinStrings())

Explanation:

Create a function called joinStrings

Initialize join variable to hold the strings that will be combined

Create a while loop that stops when user enters "Q". Otherwise, ask the user for a new string and join it to the join variable with a space

When the loop is done, return the join

Call the function and print the result

You might be interested in
Help please<br>Who will give the answer I'll mark him/her as brainlist..​
kolbaska11 [484]

Answer:

We will be using Average function of Excel Calculation sheet.

Its Syntax in Calc sheet is : =AVERAGE (number1, [number2], ...)

or you can use =Average and then click on the first cell and drag the whole row till end and close the brackets. It will calculate the average of that row.

Once you have applied average function on first row, you can drag this cell down the column and it will replicate the same function for respective rows.

4 0
3 years ago
How can we work together to fix problems with our websites
Virty [35]
Add a Value Proposition. ...
Website Navigation. ...
Call to Action Text. ...
Call to Action Colors. ...
Try The 10-Foot Test. ...
Carousels. ...
Social Proof. ...
Testimonial Pages.
8 0
3 years ago
lance has three tables in his database. He wants to generate a report to show data from the three tables. Therefore, he decides
Masja [62]

Two of the three tables in his database should have foreign keys that link to primary keys in one of the other tables. That way he can join the tables together.

7 0
3 years ago
Read 2 more answers
(10 points) [Edhesive] 3.6 Code Practice
Digiron [165]

Answer:

  • You need to create a variable outside (before) the input loop.
  • You need a variable inside your loop that temporarily holds the user input.
  • In your loop, you will compare if the variable outside the loop is greater than (or less than) the new user input.

I don't know what program language you are using, but I will use python since it's easy to read and you will get the idea if you're using a different programming language.

<u>Code (Python)</u>

largestnum = 0

for x in range(6): <em>#loops 6 times</em>

   newnum = int(input("Enter a number: ")) #ask user for input & converts to int.

   if newnum > largestnum: <em>#if new number is greater than largest num </em>

     largestnum = newnum     <em>#make it the largest number</em>

<em>    </em>print("Largest:", largestnum)

The reason why you need a variable outside of the loop is because after the loop is done all variables inside the loop are trashed and can no longer be accessed outside of the loop.

3 0
4 years ago
What’s some insider knowledge that only people in your line of work have?
ZanzabumX [31]
We can read things like this 3elô m7 n&m3
4 0
3 years ago
Read 2 more answers
Other questions:
  • How can social media be used to find out about activities?
    5·2 answers
  • 2 Which statement best explains how computers are used to analyze information?
    6·1 answer
  • A user reports that he can't connect to a specific website. you go to the user's computer and reproduce the problem. what should
    11·1 answer
  • What process combines data from a list with the content of a document to provide personalized documents?
    10·1 answer
  • What is the difference between primary storage, secondary storage and off-line storage?
    5·1 answer
  • Routing in Practice (30 points). For each of the statements below, decide which it is true or false, and briefly justify your an
    13·1 answer
  • int sequence[10] = { 3, 4, 5, 6, 7, 8, 9, 10, 1, 2 }; Write a C++ program to ask the user to enter a number, if the number can b
    10·1 answer
  • Write a method named quarterstodollars. the method should accept an int argument that is a number of quarters, and return the eq
    13·2 answers
  • How to find out what version of windows i have?
    13·1 answer
  • A(n) ________________ must be completed immediately following an incident as it is an essential document that details an inciden
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!