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
Alecsey [184]
3 years ago
14

Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T

he output of the program is every word in the list that contains the character at least once. Assume at least one word in the list will contain the given character. Assume that the list of words will always contain fewer than 20 words.
Ex: If the input is:
4 hello zoo sleep drizzle z
then the output is:
zoo
drizzle
To achieve the above, first read the list into an array. Keep in mind that the character 'a' is not equal to the character 'A'.
Computers and Technology
1 answer:
MrMuchimi3 years ago
7 0

In python 3.8:

user_input = input().split()

x = user_input[0]

char = user_input[-1]

for w in range(1,int(x)+1):

   if char in user_input[w]:

       print(user_input[w])

I hope this helps

You might be interested in
Adding Objects in Outlook
skelet666 [1.2K]

Answer:

I know its kinda late, but the answer is (B. Insert) on edg 2021.

Explanation:

5 0
3 years ago
What is the differnce between concurrent software and sequential software and which one is better with multiprocessors ???
3241004551 [841]

Answer:

Concurrent software is better suited to parallel processing environment represented by multiprocessors as compared to sequential software.

Explanation:

Sequential software corresponds to a code which is executed step by step on  a single processing unit. A concurrent software on the other hand supports parallel execution by splitting the execution across multiple parallely executing component units. A multiprocessor system speeds up concurrent execution by providing independent execution units (processors) for these code segments running parallely. So concurrent software is better suited to multiprocessors.

4 0
4 years ago
Which option will Joan use to get a glimpse of how her presentation will look when she presents it to her audience? Joan will us
Murrr4er [49]

Since Joan wants to see what her presentation would look like in the eyes of her audience, it might be best for her to use the Slideshow view that is available at the bottom right side of her desktop view.

This option is a full-screen form of her Normal view in Microsoft PowerPoint. The Slideshow view is represented by the projector screen symbol next to the zoom in and out bar.

7 0
3 years ago
Read 2 more answers
sure the provided file named Furniture.cpp is open. The file includes variable declarations and output statements. Read them car
larisa [96]

This question is incomplete. The complete question is given below:

In this lab, you complete a partially written C++ program that is provided for you. The program, which was written for a furniture company, prints the name of the furniture item, its retail price, its wholesale price, the profit made on the piece of furniture, a sale price, and the profit made when the sale price is used.

Instructions

Ensure the provided file named Furniture.cpp is open.

The file includes variable declarations and output statements. Read them carefully before you proceed to the next step.

Design the logic and write the C++ code that will use assignment statements to:

Calculate the profit (profit) as the retail price minus the wholesale price

Calculate the sale price (salePrice) as 25 percent deducted from the retail price

Calculate the sale profit (saleProfit) as the sale price minus the wholesale price.

Execute the program by clicking the Run button. Your output should be as follows:

Item Name: TV Stand

Retail Price: $325

Wholesale Price: $200

Profit: $125  

Sale Price: $243.75

Sale Profit: $43.75

Code

// This program calculates profits and sales prices for a furniture company.

#include <iostream>

#include <string>

using namespace std;

int main()

{

string itemName = "TV Stand";

double retailPrice = 325.00;

double wholesalePrice = 200.00;

double salePrice;

double profit;

double saleProfit;

     

// Write your assignment statements here

     

cout << "Item Name: " << itemName << endl;

cout << "Retail Price: $" << retailPrice << endl;

cout << "Wholesale Price: $" << wholesalePrice << endl;

cout << "Profit: $" << profit << endl;  

cout << "Sale Price: $" << salePrice << endl;

cout << "Sale Profit: $" << saleProfit << endl;

return 0;

Answer:

#include <iostream>

#include <string>

#include <iomanip>

using namespace std;

int main()

{

  string itemName = "TV Stand";

  double retailPrice = 325.00;

  double wholesalePrice = 200.00;

  double salePrice;

  double profit;

  double saleProfit;

  profit=retailPrice-wholesalePrice;

  salePrice=retailPrice-retailPrice*.25;

  saleProfit=salePrice-wholesalePrice;

  cout<<fixed<<setprecision(2);

  cout << "Item Name: " << itemName << endl;

  cout << "Retail Price: $" << retailPrice << endl;

  cout << "Wholesale Price: $" << wholesalePrice << endl;

  cout << "Profit: $" << profit << endl;

  cout << "Sale Price: $" << salePrice << endl;

  cout << "Sale Profit: $" << saleProfit << endl;

  return 0;

}

Explanation:

  • Calculate profit on retailPrice by subtracting wholesalePrice from the retailPrice.
  • set salePrice as 25% by multiplying it with 0.25.
  • Calculate the profit on sale price by subtracting wholesalePrice from the salePrice.  
  • Finally print the values of item name, retail price, wholesale price, profit, sale price and sale profit respectively.

7 0
4 years ago
FREE 100 POINTS + FIRTS AWNSER = BRAINIST
Hatshy [7]

Answer:

wow thanks!

Explanation:

i really needing something to be happy about

3 0
3 years ago
Read 2 more answers
Other questions:
  • When i click a link the page doesn't pop up HELP THE TOMATO
    9·1 answer
  • Explain LCD and give two example​
    7·2 answers
  • To save time and avoid formatting errors, you can use the__ to apply custom formatting to other places in your presentation and
    13·1 answer
  • After which stage in the information processing cycle can data be referred for future use?
    7·1 answer
  • 4. An abstract data type is defined as _____.
    14·1 answer
  • Which statements accurately describe the Bookmark feature in the Audio/Video control bar? Check all that apply.
    13·1 answer
  • Which of the following “invisible” marks represents an inserted tab?
    11·2 answers
  • Pls help will mark brainliest as soon as u awnser
    15·1 answer
  • At Moore High, 456 students attended the prom. This is 65 more students than
    13·2 answers
  • QUICK HELP ME PLEASE
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!