4.5 Code Practice
Write a loop that inputs words until the user enters STOP. After each input, the program should number each entry and print in this format:
(This code must be in python, also if a minor explanation can be added to the bottom that would be nice. But also long as u can help I will be fine)

Answers

Answer 1

i = 0

while True:

   user_input = input("Please enter the next word: ")

   if user_input == "STOP":

       break

   i += 1

   print("#{}: You entered {}".format(i,user_input))

print("All done. {} words entered.".format(i))

First we set i equal to zero so that we can keep track of how many words we input.

We set while True so that its a continuous loop until a certain condition is met to break out of the loop.

user_input is set equal to whatever word the user enters.

our if statement tells us to break out of the while loop if the user inputs "STOP"

If the user does not enter STOP i is set equal to itself plus 1. This just means we add one to i for every new word entered.

Then we print whichever word is entered.

After the while loop, we print All done and the quantity of words entered.  

Answer 2

Answer:

c = 0

word = input("Enter a word: ")

while word!="STOP":

   c = c+1

   print("#" + str(c) + ": You entered "+str(word))

   word = input("Please enter the next word: ")

print("All done. "+str(c)+" words entered.")


Related Questions

Why is it important to explore an Integrated
Development Environment?
A. To learn more about the syntax of Java
B. To learn more about the features of the environment
C. To learn more about error handling
D. To learn more about abstractions

Answers

Answer:

The answer to this question is given below in the explanation section. The correct answer is B.

Explanation:

The purpose behind to explore an integrated development environment is to learn more about the features of the environment.

So the correct answer is B.

For example, you can use visual studio to build asp.net application using c#, then you need to explore what features visual studio offering to you.

However, other options are incorrect. Because, you can learn more about syntax, error handling, and abstraction in the programming language, not in the IDE.

in a blank excel workbook go to insert tab on the ribbon, which of the following is Not vailable 1 smart art 2 coloumns ( not coloumn chart) 3 shapes 4 pictures​

Answers

Answer:

hahahahahahahhahah

The rows that are not available in a blank excel workbook go to the insert tab on the ribbon.  The correct option is D.

What are ribbons?

Click the Ribbon Display Options icon in the document's upper right corner. The Minimize icon is to the left of it. To display the Ribbon with all tabs and all commands, select Show Tabs and Commands from the menu that appears.

Basic units known as cells are created by rows and columns in an Excel workbook. There are only a set number of rows and columns available for the workspace.

There are 1,048,576 rows in the workbook's excel worksheet. It cannot be inserted using the Insert tab on the ribbon. Images, tables, and shapes can be added by selecting the tab or option for the Insert tab.

Therefore, the correct option is D, Rows.

To learn more about rows, refer to the link:

https://brainly.com/question/29889229

#SPJ2

The question is incomplete. Your most probably complete question is given below:

Pictures

Table

Shapes

Rows

Plz answer me will mark as brainliest ​

Answers

Answer: 14. Operating     15. False   I hope this helps :)

Explanation:

Which tool did Adnan use to modify the image?

rotation handle
left sizing handle
top sizing handle
corner sizing handle

Answers

Answer:

D

Explanation:

Answer:

corner sizing handle

Explanation:

You should avoid storing files and folders on the blank

Answers

Answer:

why

Explanation:

differences between a small office and a big office​

Answers

the size and what’s in the office

Does anyone use the trinket.io to code (if so I need help)

Answers

Answer:

No sorry

Explanation:

BRAINLIEST Which function will add a name to a list of baseball players in Python?


append()

main()

print()

sort()

Answers

Answer: Append()

Explanation:

Answer:

a append

Explanation:

Which function will add a name to a list of baseball players in Python?

Write a C++ program that converts a measurement given in feet into the equivalent number of (a) yards, (b) inches, (c) centimeters, (d) meters. The program should first prompt the user to enter the number of feet to be converted. It should then read that value, calculate each of the converted lengths, and then display the converted lengths, rounded to two decimal places of accuracy. You should assume that the number of feet entered will be a floating point value. Note: All the converted lengths will also be floating point values. Conversion facts: 1 yard = 36 inches; 1 foot = 12 inches; 1 inch = 2.54 cm; 1 meter = 100 cm. Here is what output should look like from running the program (user input is shown in bold):Enter number of feet: 4= 1.33 yards= 48 inches= 121.92 cm= 1.22 metersPlease give me the pseudocode first similar to this:Display " "Read ...Let...Let...Display...Because this format of the pseudocode is required as part of the solution. Thank you!

Answers

Answer:

#include<iostream>

using namespace std;

int main()

{

float feet, yard, inch, meter, cmeter;

cout<<"Enter number of feet: ";

cin>>feet;

yard = feet * 12/36;

inch = yard * 36;

cmeter = inch * 2.54;

meter = cmeter * 100;

cout<<feet<<" feet = "<< yard<<" yard = "<<inch<<" inches = "<<cmeter<<" cm = "<<meter<<" m";

return 0;

}

Explanation:

This line declares all necessary variables

float feet, yard, inch, meter, cmeter;

The line prompts user for number of feet

cout<<"Enter number of feet: ";

This line gets user input

cin>>feet;

The next 4 lines converts feet to yard, inches, centimeter and meter

yard = feet * 12/36;

inch = yard * 36;

cmeter = inch * 2.54;

meter = cmeter * 100;

This line prints converted units

cout<<feet<<" feet = "<< yard<<" yard = "<<inch<<" inches = "<<cmeter<<" cm = "<<meter<<" m";

When you set the position property for a block element to fixed, the element

Answers

Answer:

-is positioned relative to the browser window

Hope this helps!

Answer: When you set the position property for a block element to fixed, the element  remains in an exact position on the screen even if the page is scrolled down.

Write a program with three functions: upper , lower , and reverse . The upper function should accept a pointer to a C-string as it's only argument. It should step through each character in the string, converting it to uppercase. The lower function, too, should accept a pointer to a C-string as it's only argument. It should step through each character in the string, converting it to lowercase. Like upper and lower , reverse should also accept a pointer to a string as it's only argument. As it steps through the string, it should test each character to determine whether it is upper- or lowercase. If a character is uppercase, it should be converted to lowercase. Likewise, if a character is lowercase, it should be converted to uppercase. Test the functions by asking for a string in function main , then passing it to them in the following order: reverse, lower , and upper. Main will then print out the strings to demonstrate the functions worked. Each function accepts exactly one argument. None of the functions return anything. None of the functions (other than main) interacts with the user in anyway. Variables of type string are not allowed.

Answers

Answer:

Here is the C++ program:

#include <iostream>  //to use input output functions

#include <cstring>  //to manipulate C-strings

#include <string>  //to manipulate strings

using namespace std;  //to access objects cin cout

//function prototypes

void upper(char *);  to convert to upper case

void lower(char *);  //to convert to lower case

void reverse(char *);  //to convert to reverse case

int main() {  //start of main method

   char input[101];  //creates a char type array to hold input string

   cout << "Enter a string: ";  //prompts user to enter a string

   cin.getline(input, 101);  //reads input string from user

   upper(input);  //calls upper() method to convert the string to upper case

   lower(input);  //calls lower() method to convert the string to lower case

   reverse(input); } //calls reverse() method to convert the string to reverse case

void upper(char *cString){  //method that takes a pointer to a C-string as it's only argument and converts that string to upper case

   cout << "String in upper case: ";  //displays string in upper case

   for(int i = 0; i < strlen(cString); i++){  //iterates through the input string cString until the length of the cString is reached

       if(islower(cString[i]))  //checks if the character at i-th index of cString is in lower case

           cout << (char) toupper(cString[i]);  //converts each i-th character of cString to upper case at each iteration

       else  //if no character of cString is in lower case

           cout << cString[i];    }  //displays the cString as it is

   cout << endl;}  //prints a new line

void lower(char *cString){  //method that takes a pointer to a C-string as it's only argument and converts that string to lower case

   cout << "String in lower case: "; //displays string in lower case

   for(int i = 0; i < strlen(cString); i++){  //iterates through each character using for loop  first character to last

       if(isupper(cString[i]))  //checks if the character at i-th index of cString is in upper case

           cout << (char) tolower(cString[i]);  //converts each i-th character of cString to lower case at each iteration

       else  //if no character of cString is in upper case

           cout << cString[i];    }  //displays the cString as it is

           cout << endl; }  //prints a new line

void reverse(char *cString){  //method that takes a pointer to a C-string as it's only argument and converts that string to reverse case (upper to lower and vice versa)

   cout << "String in reverse case: ";  //displays string in reverse case

   for(int i = 0; i < strlen(cString); i++){  //iterates through each character using for loop  first character to last

       if(isupper(cString[i]))  //checks if the character at i-th index of cString is in upper case

           cout << (char) tolower(cString[i]);  //converts character at i-th position of cString to lower

       else  //if the character is in lower case

           cout << (char) toupper(cString[i]);    }  //converts character at i-th position of cString to upper

   cout << endl;}  //prints a new line

 

Explanation:

I will explain the program with an example.

Lets suppose user enters "hi" as input. So

Now first upper() method is called by passing this C-string to it.

It has a for loop that checks at each iteration, if a character of C-string is in lower using islower method which returns true if the character is in lower case. Since both the characters 'h' and 'i' are in lower in case so they are converted to upper case at each iteration using toupper() method. So the output of this part is:

String in upper case: HI

Now next lower() method is called by passing this C-string to it.

It has a for loop that checks at each iteration, if a character of C-string is in upper using isupper method which returns true if the character is in upper case. Since both the characters 'h' and 'i' are in lower in case so the string remains as it is. So the output of this part is:

String in lower case: hi

Now next reverse() method is called by passing this C-string to it.

It has a for loop that checks at each iteration, if a character of C-string is in upper using isupper method which returns true if the character is in upper case. Since both the characters 'h' and 'i' are in lower so else part: cout << (char) toupper(cString[i]); executes which converts these characters to upper case (reverse case). So the output of this part is:

String in reverse case: HI

The screenshot of program output with a different example is attached.

Passivity can harm relationships because those who are passive
a. Have open relationships with others
b. Tend to store up hurt feelings, leading to resentment
C. Typically have excessive self-esteem
d. Are free from self doubt and worry

Answers

Answer:

B. Tend to store up hurt feelings, leading to resentment

Explanation:

May I have brainliest please? :)

Passivity can injure relationships because those who are passive that can tend to store up hurt impressions, leading to resentment.

What is the Passivity?

passiveness or Passivity is defined as Only the feeling of repository visitors that pass before his paintings get down me more than this charlatan, and they may have a hunch that they are being duped, but they are unable to accept the information of their eyes.

Passivity can ruin relationships because passive people prefer to hold on to upset sentiments, which can develop to resentment.

Therefore, option b is correct.

Learn more about the Passivity, refer to:

https://brainly.com/question/20924905

#SPJ2

How would an assignee enter details, such as mileage and billing information, for a task?

Create a new task, and enter the details.
Open the status report, and enter the details.
In the main task window, click the Details button.
Within the assigned task window, scroll to the bottom.

Answers

Answer:

It's C

Explanation:

On edg

Answer:

C is correct

Explanation:

I got it on edg

Remy’s manager has asked him to change the background color scheme from reds to blues in the standard template the company uses for employee training presentations. She cautioned him not to change any other elements of the template.

What should Remy do in the Slide Master view to change only the color scheme?

In the Background group, select Colors, and find a color scheme that fits.
Choose Edit Theme, and select a new theme that includes a blue background.
Go to the Master Layout group, click Insert Placeholder, and choose a placeholder with a blue background.
Change the background color to light blue, and save the file as a new presentation rather than as a template.

Answers

Answer:

A on edg

Explanation:

I took the assigment

Answer: in the background group, select colors, and find a color scheme that fits.

Explanation:

After modifying a numbered list in her presentation, Su notices the numbers and the text are too close to each other. She knows she can solve this issue by using the hanging indent marker. Unfortunately, the ruler is not visible in her PowerPoint workspace.

Which tab and command group should she use to access the ruler? (View, Show or Insert, Add-ins or Home, Paragraph)
After selecting the numbered list, in which direction should she drag the hanging indent marker to increase the space between the numbers and the text? (upward or downward or to the left or to the right)

Answers

Answer:

1. View, show

2. to the right

Explanation:

On edg

Answer:

1) View, Show

2) to the right

Explanation:

Which three skills are useful for success in any career?

Answers

Answer:

Problem solving.

Teamwork. ...

Initiative. ...

Analytical, quantitative. ...

Professionalism, work ethic. ...

Leadership. ...

Detail oriented.

Answer: Multitasking Skills, Resource- Management Skills, Time-Management Skills

Explanation: Got it correct!

Which insert image option allows a user to compile, modify, and add captions to images?

Pictures
Screenshot
Photo Album
Online Pictures

Answers

Answer:

heres my answer and my proof

Explanation:

Photo Album is insert image option allows a user to compile, modify, and add captions to images. Hence,  option C is correct.

What is a Photo Album?

A piece of software called a digital picture album allows users to upload image files from a computer's hard drive, memory card, scanner, or digital camera to a central database.

A bound or loose-leaf book with blank pages, pockets, envelopes, etc. used for displaying or storing photographs, stamps, and other valuables, as well as for autographs. an audio compilation of various musical selections, a whole drama, an opera, etc.

The paper of your choosing is directly printed with the images for your picture book. In picture albums, photo prints are commonly adhered to the pages. Photo books are frequently lighter and thinner than conventional photo albums, taking up less room on the coffee table or shelf.

Thus, option C is correct.

For more information about Photo Album, click here:

https://brainly.com/question/20719259

#SPJ2

What does the fact that online games are so popular most likely prove?
A. People don't like board games.
B. Online games are an influential medium.
C. All games are addictive.
D. Everyone should play online games.

Answers

B. Online games are an influential medium.

You can copy and paste ________ from excel to powerpoint

Answers

Answer: data

Explanation:

Your answer is:data

9. A change in the appearance of a value or label in a cell
a) Alteration
b) Format
c) Indentation
d) Design
10. The placement of information within a cell at the left edge, right ed
a) Indentation
b) Placement
c) Identification
d) Alignment
11. Spreadsheet can be best classified as
a) Word
b) Database
c) Excel
d) Outlook
12. Formulas in Excel start with​

Answers

Answer:

format

alignment

excel

=

Explanation: i'm an accountant

A change in the appearance of a value or label in a cell is format. The placement of information within a cell at the left edge, right edge is alignment, and spreadsheet can be best classified as Excel. The correct options are b, d, and c respectively.

What exactly does a spreadsheet mean?

A spreadsheet, also known as an electronic work sheet, is a computer program that organizes data into graph-like rows and columns. Formulas, commands, and formats can be used to manipulate each row and column.

Spreadsheets are most commonly used to store and organize data such as revenue, payroll, and accounting information. Spreadsheets allow the user to perform calculations on the data and generate graphs and charts.

Format is a change in the appearance of a value or label in a cell. The alignment of information within a cell at the left edge, the alignment of information within a cell at the right edge, as well as spreadsheets are usually best classified as Excel.

Thus, b, d, and c respectively are correct options.

For more details regarding spreadsheet, visit:

https://brainly.com/question/8284022

#SPJ6

Pinhole cameras use a conflex lens.
True
False

Answers

Answer:

False

Explanation:

I'm always right

Determine whether the compound condition is True or False.
4 < 3 and 5 < 10
4 <3 or 5 < 10
not (5 > 13)

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The given compound statement are:

4 < 3 and 5 < 10

4 <3 or 5 < 10

not (5 > 13)

4 < 3 and 5 < 10  this statement is false because "and" logical operator required that both operand (4<3) and (5<10) are true. Statement (4<3) is a false statement so this statement is false. "and" operator becomes true when all its inputs are true otherwise it becomes false.

4 < 3 or 5 < 10  this statement is true because "or" logical operator to be true if one of its input is true and false when all inputs are false. so in this compound statement, the first statement is false and the second statement is true. so this compound statement is true.

not(5>13) this compound statement is true because it has "not" operator and "not" operator makes a false statement to true and vice versa. so (5>13) is a false statement, and when you append "not" operator before it, then this compound statement will become true statement, so this is a true statement.

The given compound conditions would be considered true or false as follows:

i). 4 < 3 and 5 < 10 - False

ii). 4 <3 or 5 < 10 - True

iii). not (5 > 13)  - True

i). 4 < 3 and 5 < 10 would be considered false and the reason behind this is that the logical operator 'and' implies that both are equivalent but here 4 < 3 is incorrect as it differentiates from the meaning conveyed in 5 < 10ii). In the second statement i.e. 4 <3 or 5 < 10, 'or' is the correct logical operator because one of the parts i.e. 5 < 10 is actually true while the latter is false.iii) In the next part "not (5 > 13)" is also true as it adequately uses the operator 'not' to imply that 5 is not bigger than 13 which implies it to be true.

Thus, the first statement is false and the other two are true.

Learn more about 'Compound Condition' here:

brainly.com/question/1600648

give the synyax and example of any three mathematical functions in spreadsheet​

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

There are different mathematical functions that can be used in the spreadsheet for performing some required calculations on data such as taking the average of numbers, adding numbers, multiplying the numbers.

But most commonly used three mathematical functions in the spreadsheet is given below:

1. AVERAGE(): The average function is used to find the average of a given number of cells.  

Syntax of Average() function: average(number1, number2,.....).

2. SUM(): The sum function is used to add all the values within a range of cells.

Syntax: of sum() function:  sum(cell address1: cell address2)

3.COUNT(): Count () function is used to count the number of data.  

Syntax of Count() function: count(cell address1: cell address2)

Which change should she make in her outline?

Change Step 2 to “Click the Format tab.”
Change Step 3 to “Open the Chart Title dialog box.”
Change Step 4 to “Type in the chart title.”
Change Step 5 to “Add the Chart Title.”

Answers

Answer:

A

Explanation:

A standard core of rules or specification is beneficial because ____.
A. all programmers involved in with a product can follow the same guidelines
B. A variety of styles is the best for the final part
C. Everyone’s code style is followed
D. Style changes with different subject matter

Answers

Answer:

The answer to this question is given below in the explanation section. However, the correct answer is A.

Explanation:

A standard core of rules or specification is beneficial because ____.

A. all programmers involved in with a product can follow the same guidelines

B. A variety of styles is the best for the final part  

C. Everyone’s code style is followed

D. Style changes with different subject matter

The correct answer is

A standard core of rules or specification is beneficial because all programmers involved in with a product can follow the same guidelines .

Other options are not correct because a variety of styles is not   prefered and used in software development, and everyone's code style can not be followed easily. Because programming style changes with different programmers, so it would not easy for other programmer to read and understand the code.    

Submit your design an informative computer safety brochure for a specific cybercrime that targets an audience of your choice.

Answers

USE SOCRACTIC IT WOULD DEFINITELY HELP ANSWER THIS QUESTION Try it

Given code
#include
#include
using namespace std;
bool weHaveWinner(int a,int b)
{
return (a>=21 && b>=21 && abs(a-b)>1);
}
int main()
{
int aPoints = 0;
int bPoints = 0;
string input;

// ToDo: Write a loop until input is "end" or we have a winner
// the loop should read the input and add a point to aPoints if "A"
// or add a point to bPoints if "B", don't do anything but leave the
// loop if "end"

while(1)
{
cin >> input;
if(input=="end")
break;
if(input=="A")
aPoints++;
if(input=="B")
bPoints++;
if(weHaveWinner(aPoints,bPoints))
break;
}
// Tell the user if we have a winner or not
if(aPoints > bPoints + 1 && aPoints >= 21)
{
cout aPoints + 1 && bPoints >= 21)
{
cout << "Team B won! (" << aPoints << "-" << bPoints << ")" << endl;
}
else
{
cout << "Game ended as a draw. (" << aPoints << "-" << bPoints << ")" << endl;
}
return 0;
}

Answers

Answer:

YES

Explanation:

Answer:

yeet

Explanation:

yeet

______ means locating a file among a set of file​

Answers

Answer:

computer files

Explanation:

Next, Sue decides to embed a chart from Microsoft Word. She copies and pastes data from a table that she has already created in a Word document. The table includes the results of her paper towel experiment. After reviewing her work, she realizes she needs to update one of the values.

How can she change that value so it is reflected in the chart in her presentation?

She can change the value in the original table in Word.
She can change the value directly on the chart in PowerPoint.
She can change the value using the Current Selection command group.
She can change the value in the mini- spreadsheet for the chart in PowerPoint.

Answers

Answer:

Its D

Explanation:

On Edg

Answer:

D. She can change the value in the mini- spreadsheet for the chart in PowerPoint.

Explanation:

hope this helps :)

easy points
Cats or dogs? :D

Answers

Cats are better than dogs

Other Questions
complete the template below to help you plan out your letter my product its a custom can of Pringles and I made the flavor of Pringles popcornI. Paragraph one- Introduction1. (introduce yourself and explain your experience related to the product) _____________________________________________________________________2. (explain why you are writing) _____________________________________________________________________ 3. (briefly describe your food product and name for your food) _____________________________________________________________________II. Paragraph two- Describe your Food Product1. ( describe the flavors, ingredients, texture) _____________________________________________________________________2. (what does your food look like) _____________________________________________________________________3. (how is your food unique what makes it different than other products out there) _____________________________________________________________________III. Paragraph three- Describe the Packaging1. (describe the colors in your packaging )____________________________________________________________2. (describe any images, art, or photos on the package) _____________________________________________________________________3. (describe the size and materials used in the package) ______________________________________________IV. Paragraph four- Convince The Company1. (describe the target population who will buy the food (ex. Moms, diabetics, vegetarians, teens) _____________________________________________________________________2. (why should they make and market your food?)_______________________________________________________________3. (how much will you sell your food for? Sold individually or in larger quantities?) _____________________________________________________________________V. Paragraph five- Conclusion1. (Tell what you want the company to do) ___________________________________________________________________________________________________________________2. (Restate what makes your food delicious) ___________________________________________________________________3. (Restate what makes your food unique) _____________________________________________________________________ An isosceles triangle has two sides of equal length, a, and a base, b. The perimeter of the triangle is 15.7 inches, so the equation to solve is 2a + b = 15.7.If we recall that the sum of the lengths of any two sides of a triangle must be greater than the length of the third side, which lengths make sense for possible values of b? An airplane flying due north at 90km/h is being blown due west at 50 km/h. What is the magnitude of the resultant velocity of the plane? This table represents the proportional relationship between the number of boxes and the number of magnetic cubes held by the boxes.What is the unknown value representing the unit rate?A. 8B. 125C. 140D. 156 Which of the following contributed to the outbreak of the Revolutionary War? which of these is an example of sarcasm what number is greater 3 or 5 Identify the binomial 3.Question 3Rewrite the following telegram in a complete sentence (including punctuation, capitalization and accents), without changing the underlined words. See the module 1 reading Typing Spanish Accents and Punctuation for assistance. This resource is also available in the Supplementary Materials section of the course.Jorge y Rosa/recibir/medicina/de/su/mdico. Solve -10x = 30 *1 pointpre algebra What areas of Sudan and South Sudan have the lowest population density, and why? An automobile's radiator has a capacity of fifteen quarts, and it currently contains twelve quarts of a thirty percent antifreeze solution. How many quarts of antifreeze are currently in the radiator? What is the difference in the steps you take to evaluate (-7)2 and -72 ? What is thedifference in the values? creepy fats about fort prince george where do you put a decimal on 64 Which point is inside of the triangle?hurry and answer. Find the value of the expression 30 3 2 3 + 8(2). Which of the following is true of intellectual property? What are some things to help u gain weight fast? please help its due today :)Think of a fictional product or an improved product you would like to sell and write two different short advertisements for two different audiences. Describe the advertisement, the medium (TV, radio, magazine, billboard, etc.), and the audience you are attempting to reach. The advertisement may be in script or descriptive paragraph form.