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
n200080 [17]
3 years ago
12

In Python please:

Computers and Technology
1 answer:
blsea [12.9K]3 years ago
4 0

Answer:

c = input("Enter a character: ")

words = input("Enter the words: ")

lst = words.split()

for w in lst:

   if c in w:

       print(w)

Explanation:

Ask the user for the character and words

Take each word in the words and put them in a list using split method

Create a for loop that iterates through the lst

Inside the loop, check is a word in the lst contains the given character. If it does, print the word

You might be interested in
Assume you are given a boolean variable named isNegative and a 2-dimensional array of ints that has been created and assigned to
Anon25 [30]

Answer:

#include <iostream>

using namespace std;

int main(){

   int rows, cols;

   bool isNegatives;

   cout<<"Rows: ";

   cin>>rows;

   cout<<"Columns: ";

   cin>>cols;

   int a2d[rows][cols];

   for(int i =0;i<rows;i++){

   for(int j =0;j<cols;j++){

       cin>>a2d[i][j];}    }

   int negatives, others = 0;

   for(int i =0;i<rows;i++){

   for(int j =0;j<cols;j++){

       if(a2d[i][j]<0){

           negatives++;}

       else{

           others++;}}    }

   if(negatives>others){

       isNegatives = true;}

   else{

       isNegatives = false;}

   cout<<isNegatives;  

   return 0;

}

Explanation:

For clarity and better understanding of the question, I answered the question from the scratch.

This line declares number of rows and columns

   int rows, cols;

This line declares the Boolean variable

   bool isNegatives;

This line prompts user for rows

   cout<<"Rows: ";

This line gets the number of rows

   cin>>rows;

This line prompts user for columns

   cout<<"Columns: ";

This line gets the number of columns

   cin>>cols;

This line declares the array

   int a2d[rows][cols];

This line gets user input for the array

<em>    for(int i =0;i<rows;i++){</em>

<em>    for(int j =0;j<cols;j++){</em>

<em>        cin>>a2d[i][j];}    }</em>

This line declares and initializes number of negative and others to 0

   int negatives, others = 0;

The following iteration counts the number of negatives and also count the number of non negative (i.e. others)

<em>    for(int i =0;i<rows;i++){</em>

<em>    for(int j =0;j<cols;j++){</em>

<em>        if(a2d[i][j]<0){</em>

<em>            negatives++;}</em>

<em>        else{</em>

<em>            others++;}}    }</em>

This checks of number of negatives is greater than others

   if(negatives>others){

If yes, it assigns true to isNegatives

       isNegatives = true;}

   else{

If otherwise, it assigns false to isNegatives

       isNegatives = false;}

This prints the value of isNegatives

   cout<<isNegatives;  

<em>See attachment</em>

Download cpp
5 0
3 years ago
It is possible to collaborate on a presentation with a group of people using the Internet.
DerKrebs [107]

Answer:

True

Explanation:

4 0
4 years ago
Most shops require the technician to enter a starting and ending time on the repair order to track the actual time the vehicle w
Alecsey [184]

The time being referred to is C. cycle time. Cycle time refers to the amount of time from start to end of a process as agreed and defined by a service provider (in this case, the technician) and the customer. Cycle time can also be lengthened or shortened.

5 0
4 years ago
Read 2 more answers
Which statement best describes top-down programming design?
MariettaO [177]

B is the answer (i think)

5 0
3 years ago
PLEASEEEE PLEASEEE HELPPPP
olga nikolaevna [1]

Explanation:

you need a better pic if possible, it's kinda hard to read the question.

4 0
3 years ago
Other questions:
  • Use ___________ positioning to configure the location of an element to remain the same and to not move even when the web page is
    6·2 answers
  • A(n) _____ is an organized collection of people, procedures, software, databases, and devices that stores and retrieves knowledg
    6·1 answer
  • Xavier would like to change the sort options for his contacts. In which tab will he find the Arrangement command group?
    6·1 answer
  • Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total. For example, if the user en
    6·1 answer
  • A communication medium that carries a large amount of data at a fast speed is called
    6·1 answer
  • What are business rules​
    14·1 answer
  • What would be an ideal scenario for using edge computing solutions? a regional sales report uploaded to a central server once a
    14·1 answer
  • Which type of protocol allows for a secure data transmission using encryption methods?
    7·1 answer
  • status is a non-volatile memory chip used for store translation data between personal computer PC and digital device ​
    8·1 answer
  • Which device is used to direct the flow of data on a computer network?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!