Write two statements to read in values for my_city followed by my_state. Do not provide a prompt. Assign log_entry with current_time, my_city, and my_state. Values should be separated by a space. Sample output for given program if my_city is Houston and my_state is Texas: 2014-07-26 02:12:18: Houston Texas Note: Do not write a prompt for the input values. 1 current_time = '2014-07-26 02:12:18:' 2 my_city = "' 3 my_state = "" 4 log_entry - "' 1 test passed 6 print(log_entry) All tests passed Run Run

Answers

Answer 1

Answer:

Here is the program:

current_time = '2014-07-26 02:12:18:'  

my_city = ''

my_state = ''

log_entry = ''

 

my_city = input("")   #reads in value for my_city

my_state = input("")  #reads in value for my_state

log_entry = current_time + ' ' + my_city + ' ' + my_state   #concatenates current_time, my_city and my_state values with ' ' empty space between them

 

print(log_entry)

Explanation:

You can also replace

log_entry = current_time + ' ' + my_city + ' ' + my_state  

with

log_entry = f'{current_time} {my_city} {my_state}'

it uses f-strings to format the strings

If you want to hard code the values for my_city and my_state then you can replace the above

my_city = input("")

my_state = input("")

with

my_city = "Houston"

my_state = "Texas"

but if you want to read these values at the console from user then use the input() method.

The screenshot of the program along with the output is attached.

Write Two Statements To Read In Values For My_city Followed By My_state. Do Not Provide A Prompt. Assign
Answer 2

In this exercise we have to use the knowledge of the python language to write the code, so we have to:

The code is in the attached photo.

So to make it easier the code can be found at:

current_time = '2014-07-26 02:12:18:'

my_city = ''

my_state = ''

log_entry = ''

my_city = input("")   #reads in value for my_city

my_state = input("")  #reads in value for my_state

log_entry = current_time + ' ' + my_city + ' ' + my_state   #concatenates current_time, my_city and my_state values with ' ' empty space between themlog_entry = current_time + ' ' + my_city + ' ' + my_state

log_entry = f'{current_time} {my_city} {my_state}'

my_city = input("")

my_state = input("")

my_city = "Houston"

my_state = "Texas"

See more about python at brainly.com/question/26104476

Write Two Statements To Read In Values For My_city Followed By My_state. Do Not Provide A Prompt. Assign

Related Questions

True or False: Wikipedia is a reliable source. ​

Answers

false,
it's not a reliable source

Answer:

Answers are given by the users, so reliable information varies. Usually, you can find if it is reliable by checking other websites to see if the information matches up with other reliable websites.

Explanation:

Write (define) a function named count_down_from, that takes a single argument and returns no value. You can safely assume that the argument will always be a positive integer. When this function is called, it should print a count from the argument value down to 0.

Examples: count_down_from(5) will print 5,4,3,2,1,0, count_down_from(3) will print 3,2,1,0, count_down_from(1) will print 1,0,

Answers

Answer:

Written in Python

def count_down_from(n):

    for i in range(n,-1,-1):

         print(i)

Explanation:

This line defines the function

def count_down_from(n):

This line iterates from n to 0

    for i in range(n,-1,-1):

This line prints the countdown

         print(i)

Research an organization that is using supercomputing, grid computing or both. Describe these uses and the advantages they offer. Are they a source of competitive advantage? Why or why not? Please be sure to include your reference(s).

Answers

Answer:

Procter and Gamble is an organization that uses supercomputing.

Explanation:

Supercomputing refers to the use of high-performance computers in the development and production of items. Procter and Gamble is a company known for the production of many household items and personal care products. Uses and advantages of supercomputing to this company include;

1. Testing virtual prototypes of substances used in production: This is a faster way of developing products that are sustainable because many prototypes can be examined with the help of computers and the best chosen for production.

2. Developing unique designs of products: Supercomputers allow for the development of high-quality designs which include the internal and external designs of products.

3. Simulation of many molecules: Molecules such as those involved in the production of surfactants can be analyzed to understand how they work with the aid of supercomputers.

4. Computational fluid dynamics: This helps the scientists to understand how fluid works using numerical analysis and the structure of compounds.

The designs and products obtained through supercomputing are a source of competitive advantage because the company can make high-quality and unique products that appeal to customers and meet the latest trends. This would increase their marketability and give them an advantage over companies that do not have access to these computers.

Reference:   The Department of Energy. (2009) High-Performance Computing Case Study. Procter & Gamble's Story of Suds, Soaps, Simulations, and Supercomputers

WILL GIVE BRAINIEST! Your users are young children learning their arithmetic facts. The program will give them a choice of practicing adding or multiplying. You will use two lists of numbers. numA = [4, 1, 6, 10, 2, 3, 7, 9, 11, 12, 5, 8]. numB = [2, 12, 10, 11, 1, 3, 7, 9, 4, 8, 5, 6]. If the user chooses adding, you will ask them to add the first number from each list. Tell them if they are right or wrong. If they are wrong, tell them the correct answer. Then ask them to add the second number in each list and so on. If the user chooses multiplying, then do similar steps but with multiplying. Whichever operation the user chooses, they will answer 12 questions. Write your program and test it on a sibling, friend, or fellow student.

Answers

In python:

numA = [4, 1, 6, 10, 2, 3, 7, 9, 11, 12, 5, 8]

numB = [2, 12, 10, 11, 1, 3, 7, 9, 4, 8, 5, 6]

while True:

   i = 0

   userChoice = input("Adding or Multiplying? (a/m) ")

   if userChoice == "a":

       while i < len(numA):

           answer = int(input("What is {} + {} ".format(numA[i],numB[i])))

           if answer == numA[i] + numB[i]:

               print("Correct!")

           else:

               print("That's incorrect. The right answer is {}".format(numA[i] + numB[i]))

           i += 1

   elif userChoice == "m":

       while i < len(numA):

           answer = int(input("What is {} * {} ".format(numA[i], numB[i])))

           if answer == numA[i] * numB[i]:

               print("Correct!")

           else:

               print("that's incorrect. The right answer is {}".format(numA[i] * numB[i]))

           i += 1

The program will give them a choice of practicing adding or multiplying is true.

What is computer program?

Computer program is defined as a series of instructions written in a programming language that a computer may follow. Computers can obey a set of instructions created through coding.  Programmers can create programs, including websites and apps, by coding.

Python says:

numA = [4, 1, 6, 10, 2, 3, 7, 9, 11, 12, 5, 8]

numB = [2, 12, 10, 11, 1, 3, 7, 9, 4, 8, 5, 6]

though True:

I = 0

input("Adding or Multiplying? (a/m)") userChoice

when userChoice equals "a"

even when I = len(numA):

What is input("What is + ".format(numA[i],numB[i]))? answer = int

if response == numA[i] + numB[i]:

print("Correct! ")

else:

print( "That is untrue. The appropriate response is "Formatted as (numA[i] + numB[i])

I += 1

if userChoice == "m," then

even when I = len(numA):

answer = int("What is *? ".format(numA[i], numB[i]))

if the response equals numA[i] + numB[i]:

print("Correct! ")

else

print( "that is untrue. The appropriate response is ".format(numB * numA[i]

I += 1

Thus, the program will give them a choice of practicing adding or multiplying is true.

To learn more about program, refer to the link below:

https://brainly.com/question/11023419

#SPJ3

You are given an array of integers, each with an unknown number of digits. You are also told the total number of digits of all the integers in the array is n. Provide an algorithm that will sort the array in O(n) time no matter how the digits are distributed among the elements in the array. (e.g. there might be one element with n digits, or n/2 elements with 2 digits, or the elements might be of all different lengths, etc. Be sure to justify in detail the run time of your algorithm.

Answers

Answer:

Explanation:

Since all of the items in the array would be integers sorting them would not be a problem regardless of the difference in integers. O(n) time would be impossible unless the array is already sorted, otherwise, the best runtime we can hope for would be such a method like the one below with a runtime of O(n^2)

static void sortingMethod(int arr[], int n)  

   {  

       int x, y, temp;  

       boolean swapped;  

       for (x = 0; x < n - 1; x++)  

       {  

           swapped = false;  

           for (y = 0; y < n - x - 1; y++)  

           {  

               if (arr[y] > arr[y + 1])  

               {  

                   temp = arr[y];  

                   arr[y] = arr[y + 1];  

                   arr[y + 1] = temp;  

                   swapped = true;  

               }  

           }  

           if (swapped == false)  

               break;  

       }  

   }

Read the scenario below, and then answer the question.
Dan is trying to decide on what his major should be in college, so he chooses to take a personality
test.
What can Dan expect to learn from this test?
A. the weaknesses he can address and the strengths he has

B. the academic areas he
might have natural talent and ability in

C. which methods of solving problems and interacting with others he favors

D. what his favorite hobbies and interests are

Answers

the answer is:

c. which methods of solving problems and interacting with others he favors.

Answer:

C

Explanation:

Write a program that finds the number of items above the average of all items. The problem is to read 100 numbers, get the average of these numbers, and find the number of the items greater than the average. To be flexible for handling any number of input, we will let the user enter the number of input, rather than fixing it to 100.

Answers

Answer:

Written in Python

num = int(input("Items: "))

myitems = []

total = 0

for i in range(0, num):

     item = int(input("Number: "))

     myitems.append(item)

     total = total + item

average = total/num

print("Average: "+str(average))

count = 0

for i in range(0,num):

     if myitems[i] > average:

           count = count+1

print("There are "+str(count)+" items greater than average")

Explanation:

This prompts user for number of items

num = int(input("Items: "))

This creates an empty list

myitems = []

This initializes total to 0

total = 0

The following iteration gets user input for each item and also calculates the total

for i in range(0, num):

     item = int(input("Number: "))

     myitems.append(item)

     total = total + item

This calculates the average

average = total/num

This prints the average

print("Average: "+str(average))

This initializes count to 0

count = 0

The following iteration counts items greater than average

for i in range(0,num):

     if myitems[i] > average:

           count = count+1

This prints the count of items greater than average

print("There are "+str(count)+" items greater than average")

Who plays Breath of the Wild?

Answers

Answer:

me

Explanation:

yea not me

Explanation:

Is main memory fast or slow?

Answers

Answer:

Slower

Explanation:

For an alternative to the String class, and so that you can change a String's contents, you can use_________ .
a. char.
b. StringHolder.
c. StringBuilder.
d. StringMerger.

Answers

Answer:

c. StringBuilder

Explanation:

An alternative to the String class would be the StringBuilder Class. This class uses Strings as objects and allows you to mix and match different strings as well as adding, removing, implementing,  and modifying strings themselves as though they were similar to an array. Unlike the string class StringBuilder allows you to modify and work with a combination of strings in the same piece of data as opposed to having various objects and copying pieces which would take up more memory.

1. What is a technological system?*
A.a system that takes an input, changes it according to the system's use, and then
produces an output output
B.a system that takes an output, changes it according to the system's use, and then
produces an input
C.a system that starts with a process, then output resources in the input

Answers

Answer:

c.a system that start with a process, them output resources in the input

Write a program that reads a person's first and last names separated by a space, assuming the first and last names are both single words. Then the program outputs last name, comma, first name. End with newline. Example output if the input is: Maya Jones Jones, Maya

Answers

Answer:

Written in Python:

import re

name = input("Name: ")

print(re.sub("[ ]", ", ", name))

Explanation:

This line imports the regular expression library

import re

This line prompts user for input

name = input("Name: ")

This line replace the space with comma and prints the output

print(re.sub("[ ]", ", ", name))

Write a program that launches 1000 threads. Each thread adds 1 to a variable sum that initially is 0 (zero).

Answers

Answer:

The answer is below

Explanation:

Using Java programming language.

*//we have the following codes//*

import java.util.concurrent.ExecutorService;

import java.util.concurrent.Executors;

public class My_Answer {

private static Integer sum = 0;

public static void main(String[] args) {

 ExecutorService executor = Executors.newCachedThreadPool();

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

  executor.execute(new AddOne());

 }

 executor.shutdown();

 while (!executor.isTerminated()) {

 }

 System.out.println("sum = " + sum);

}

private static class Add_Extra implements Runnable {

 public void run() {

  sum++;

 }

}

}

PLEASE HELP WILL GIVE BRAINLIEST IM ALREADY FAILING IN THIS CLASS LOL < 3

Answers

Answer: Did you ever think of a mirror?

Explanation: Not trying to be rude about it.

Earned value:

How is it calculated?


What does the measurement tell you?

Answers

Answer:

Earned value is a measure which is used on projects to determine the value of work which has been completed to date, in order to understand how the project is performing on a cost and schedule basis. At the beginning of a project, a project manager or company will determine their budget at completion (BAC) or planned value (PV).

Explanation:

You want to look up colleges but exclude private schools. Including punctuation, what would you
type?
O nonprofit college
O college -private
O private -college
O nonprofit -college

Answers

private-college. hope this helped :)

You want to look up colleges but exclude private schools. Including punctuation, The type is private -college. The correct option is c.

What are institutions of higher studies?

The institutions for higher studies are those institutions that provide education after schooling. They are colleges and universities. Universities, colleges, and professional schools that offer training in subjects like law, theology, medicine, business, music, and art are all considered higher education institutions.

Junior colleges, institutes of technology, and schools for future teachers are also considered to be part of higher education. There are different types of colleges, like government colleges and private colleges. Private colleges are those which are funded by private institutions.

Therefore, the correct option is c. private -college.

To learn more about excluding, refer to the link:

https://brainly.com/question/27246973

#SPJ2

rray testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full credit is 100, so anything over 100 is extra credit. Ex: If testGrades

Answers

Answer:

Replace

/* Your solution goes here */

with

sumExtra = 0;

for (i =0; i<NUM_VALS;i++){

if(testGrades[i]>100){

sumExtra = sumExtra - testGrades[i] + 100;

}

}

Explanation:

This line initializes sumExtra to 0

sumExtra = 0;

The following is a loop from 0 to 3

for (i =0; i<NUM_VALS;i++){

The following if condition checks if current array element is greater than 100

if(testGrades[i]>100)

{

This line calculates the extra credit

sumExtra = sumExtra - testGrades[i] + 100;

}

}

See attachment for complete question


If the post office delivered mail exactly like the routers deliver messages on the Internet, which of the following statements would be true? (Choose all that apply)

Answers

Answer:

The mailman would sometimes take a different path to deliver each letter to your home.

Explanation:

Options:

The mailman would sometimes take a different path to deliver each letter to your home.

Letters would be written on the outside of envelopes for all to read instead of letters put inside envelopes.

Routers work in different ways and they take the fastest route no matter what is the direction they have to take, so they travel to several servers trying to find the fastest path to their destination, it changes almost everytime because of the use of servers and the conection speed of the different routes they can connect to, so that would be the option.

Two of the computers at work suddenly can’t go online or print over the network. The computers may be trying to share the same IP address.

Which strategy is most likely to solve the problem?
rebooting the network server
reconfiguring the network hubs
installing network gateway hardware
logging off one of the computers, and then logging back o

Answers

Answer:

logging off one of the computers, and then logging back on

Answer:

the last one:

logging off one of the computers, and then logging back on

Explanation:

if something goes wrong on an electronic device you can reboot it and it should eventually work.

have a nice day

Which of the following is often accessed in a browser but is not itself a browser feature or tool?
O history
add-ons
O bookmarks
webmail

Answers

Answer:

Webmail

Explanation:

Got it right on a test

Write a function addUpSquaresAndCubes that adds up the squares and adds up the cubes of integers from 1 to N, where N is entered by the user. This function should return two values - the sum of the squares and the sum of the cubes. Use just one loop that generates the integers and accumulates the sum of squares and the sum of cubes. Then, write two separate functions sumOfSquares and sumOfCubes to calculate and return the sums of the squares and sum of the cubes using the explicit formula below.

Answers

Answer:

All functions were written in python

addUpSquaresAndCubes Function

def addUpSquaresAndCubes(N):

    squares = 0

    cubes = 0

    for i in range(1, N+1):

         squares = squares + i**2

         cubes = cubes + i**3

    return(squares, cubes)

sumOfSquares Function

def sumOfSquares(N):

    squares = 0

    for i in range(1, N+1):

         squares = squares + i**2

    return squares

sumOfCubes Function

def sumOfCubes(N):

    cubes = 0

    for i in range(1, N+1):

         cubes = cubes + i**3

    return cubes

Explanation:

Explaining the addUpSquaresAndCubes Function

This line defines the function

def addUpSquaresAndCubes(N):

The next two lines initializes squares and cubes to 0

    squares = 0

    cubes = 0

The following iteration adds up the squares and cubes from 1 to user input

    for i in range(1, N+1):

         squares = squares + i**2

         cubes = cubes + i**3

This line returns the calculated squares and cubes

    return(squares, cubes)

The functions sumOfSquares and sumOfCubes are extract of the addUpSquaresAndCubes.

Hence, the same explanation (above) applies to both functions

The following equations estimate the calories burned when exercising (source): Men: Calories = ( (Age x 0.2017) — (Weight x 0.09036) + (Heart Rate x 0.6309) — 55.0969 ) x Time / 4.184 Women: Calories = ( (Age x 0.074) — (Weight x 0.05741) + (Heart Rate x 0.4472) — 20.4022 ) x Time / 4.184 Write a program with inputs age (years), weight (pounds), heart rate (beats per minute), and time (minutes), respectively. Output calories burned for men and women. Ex: If the input is 49 155 148 60, the output is:

Answers

In python:

age = float(input("How old are you? "))

weight = float(input("How much do you weigh? "))

heart_rate = float(input("What's your heart rate? "))

time = float(input("What's the time? "))

print("The calories burned for men is {}, and the calories burned for women is {}.".format(

   ((age * 0.2017) - (weight * 0.09036) + (heart_rate * 0.6309) - 55.0969) * (time / 4.184),

   ((age * 0.074) - (weight * 0.05741) + (heart_rate * 0.4472) - 20.4022) * (time / 4.184)))

This is the program.

When you enter 49 155 148 60, the output is:

The calories burned for men is 489.77724665391963, and the calories burned for women is 580.939531548757.

Round to whatever you desire.

The programming language is not stated. So, I will answer this question using Python programming language.

The program requires a sequence control structure, because it does not make use of conditions and iterations.

The program in python is as follows, where comments (in italics) are used to explain each line.

#This gets input for age, in years

age = int(input("Age (years): "))

#This gets input for weight, in pounds

weight = int(input("Weight (pounds): "))

#This gets input for heart rate, in beats per minutes

heart_rate = int(input("Heart Rate (beats per minutes): "))

#This gets input for time, in minutes

time = int(input("Time (Minutes) : "))

#This calculates the calories burnt for men

Men = ((age * 0.2017) - (weight * 0.09036) + (heart_rate * 0.6309) - 55.0969) * time / 4.184

#This calculates the calories burnt for women

Women = ((age * 0.074) - (weight * 0.05741) + (heart_rate * 0.4472) - 20.4022 ) * time / 4.184

#This prints the calories burnt for men

print("Men:", Men)

#This prints the calories burnt for women

print("Women:", Women)

At the end of the program, the program outputs the amount of calories burnt for men and women.

See attachment for sample run

Read more about Python programs at:

https://brainly.com/question/22841107

Shortest Remaining Time First is the best preemptive scheduling algorithm that can be implemented in an Operating System.

a. True
b. False

Answers

Answer:

a

Explanation:

Yes, true.

Shortest Remaining Time First, also popularly referred to by the acronym SRTF, is a type of scheduling algorithm, used in operating systems. Other times it's not called by its name nor its acronym, it is called the preemptive version of SJF scheduling algorithm. The SJF scheduling algorithm is another type of scheduling algorithm.

The Shortest Remaining Time First has been touted by many to be faster than the SJF

The answer to the question which asks if the Shortest Remaining Time First is the best preemptive scheduling algorithm that can be implemented in an Operating System is:

True

What is Shortest Remaining Time First?

This refers to the type of scheduling algorithm which is used to schedule tasks that would be executed in the processing unit in an Operating System based on the shortest time taken to execute the task.

With this in mind, we can see that this is the best preemptive scheduling algorithm that can be implemented in an Operating System because it makes task execution faster.

Read more about scheduling algorithm here:
https://brainly.com/question/15191620

You've been hired by Maple Marvels to write a C++ console application that displays information about the number of leaves that fell in September, October, and November. Prompt for and get from the user three integer leaf counts, one for each month. If any value is less than zero, print an error message and do nothing else. The condition to test for negative values may be done with one compound condition. If all values are at least zero, calculate the total leaf drop, the average leaf drop per month, and the months with the highest and lowest drop counts. The conditions to test for high and low values may each be done with two compound conditions. Use formatted output manipulators (setw, left/right) to print the following rows:________.
September leaf drop
October leaf drop
November leaf drop
Total leaf drop
Average leaf drop per month
Month with highest leaf drop
Month with lowest leaf drop
And two columns:
A left-justified label.
A right-justified value.
Define constants for the number of months and column widths. Format all real numbers to three decimal places. The output should look like this for invalid and valid input:
Welcome to Maple Marvels
------------------------
Enter the leaf drop for September: 40
Enter the leaf drop for October: -100
Enter the leaf drop for November: 24
Error: all leaf counts must be at least zero.
End of Maple Marvels
Welcome to Maple Marvels
------------------------
Enter the leaf drop for September: 155
Enter the leaf drop for October: 290
Enter the leaf drop for November: 64
September leaf drop: 155
October leaf drop: 290
November leaf drop: 64
Total drop: 509
Average drop: 169.667
Highest drop: October
Lowest drop: November
End of Maple Marvels

Answers

Answer:

#include <iostream>

#iclude <iomanip>

#include <algorithm>

using namespace std;

int main(){

int num1, num2, num3,

int sum, maxDrop, minDrop = 0;

float avg;

string end = "\n";

cout << " Enter the leaf drop for September: ";

cin >> num1 >> endl = end;

cout << "Enter the leaf drop for October: ";

cin >> num2 >> endl = end;

cout << "Enter the leaf drop for November: ";

cin >> num3 >> endl = end;

int numbers[3] = {num1, num2, num3} ;

string month[3] = { "September", "October", "November"}

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

 if (numbers[i] < 0) {

   cout << "Error: all leaf counts must be at least zero\n";

   cout << "End of Maple Marvels\n";

   cout << "Welcome to Maple Marvels";

   break;

 } else if (number[i] >= 0 ) {

     sum += number[i] ;

   }

}

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

 cout << month[i] << " leaf drop: " << numbers[i] << endl = end;

}

cout << "Total drop: " << sum << endl = end;

cout << setprecision(3) << fixed;

cout << "Average drop: " << sum / 3<< endl = end;

maxDrop = max( num1, num2, num3);

minDrop = min(num1, num2, num3);

int n = sizeof(numbers)/sizeof(numbers[0]);

auto itr = find(number, number + n, maxDrop);

cout << "Highest drop: "<< month[ distance(numbers, itr) ] << endl = end;

auto itr1 = find(number, number + n, minDrop);

cout << "Lowest drop: " << month[ distance(numbers, itr1) ] << endl = end;

cout << "End of Maple Marvels";

Explanation:

The C++ soucre code above receives three integer user input and calculates the total number, average, minimum and maximum number of leaf drop per month, if the input isn't less than zero.

Define a function called sum, for a given an array and an int representing its size, if the size is at least 3, then sum up all elements whose indices are a multiple of 3 and return that value, otherwise, return 0.

Answers

Answer:

Written in C++

int sum(int arr[], int size) {

 int total = 0;      

 if(size>=3)  {

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

     if(i%3 == 0)      {

     total += arr[i];    

     }

  }

 }

  return total;

}

Explanation:

This line defines the function

int sum(int arr[], int size) {

This line initializes sum to 0

 int total = 0;      

This line checks if size is at least 3

 if(size>=3)  {

This loop iterates through the array

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

The following adds multiples of 3

     if(i%3 == 0)      {

     total += arr[i];    

     }

  }

 }

This returns the calculated sum

  return total;

}

See attachment for full program

I prefer a job where I am praise for good performance or I am accountable for results

Answers

Answer:

What?

Explanation:

Select content, click the Copy button, click the Paste button, and move the insertion point to where the content needs to be inserted.
Click the Copy button, select the content, move the insertion point to where the content needs to be inserted, and click the Paste button.
Select the content, click the Copy button, move the insertion point to where the content needs to be inserted, and click the Paste button.
Select the content, move the insertion point to where the content needs to be inserted, click the Copy button, and click the Paste button.

Answers

Answer:

what :)

Explanation:

Write a function to receive any word as input, search the song titles only and return the number of top billboard songs that contain that word. Your function should meet the following requirements: Your function should receive any word or phrase as an input string and return a simple message with the number of songs that contain those words. E.g. [5] songs were found to contain [supplied phrase] in this dataset If the words or phrase supplied were not found in the database, return the message No songs were found to contain the words: [supplied phrase] Remember to deal with whatever letter case you are supplied i.e. all caps or all lowercase, etc. Test your function with the word like and confirm that your result reads [100] songs were found to contain [like] in this dataset

Answers

Answer:

Here is the function:

def NumberOfSongs(word):  # function definition    

   count=0  #count the occurrence of word in song

   for song in lyrics['Lyrics']:  #iterates through song lyrics

       if word in str(song):  #if word is in the song

           count=count+1  #adds 1 to the count

   if count!=0:  #if word occurs in the songs

       return f'{str(count)} songs were found to contain {word} in this dataset'  #display the count of the word in the song

   else:  #if word does not appear in any song

       return f'No songs were found to contain the words:{word}'  #returns this message if no songs were found with given word

print(NumberOfSongs('like')) #calls method with the word like given as parameter to it

Explanation:

You can add the csv file this way:

import pandas as pd

lyrics = pd.read_csv("lyrics.csv", encoding="cp1252")

Now you can use the NumberOfSongs method which iterates through the Lyrics of lyrics.csv and find if any of the songs in the file contains the specified word.

The screenshot of program along with its output is attached. Since the file was not provided i have created a csv file. You can add your own file instead of lyrics.csv

what is the use of buffer?​

Answers

Answer:

pH buffer or hydrogen ion buffer) is an aqueous solution consisting of a mixture of a weak acid and its conjugate base, or vice versa. ... Buffer solutions are used as a means of keeping pH at a nearly constant value in a wide variety of chemical applications.

Explanation:

there is your answer i got this one correct

hope it is helpful

Answer:

Limits the pH of a solution

Explanation:

A P  E X

MULTIPLE CHOICE If you are completing your math homework on a desktop in the computer lab at school, the software is


A Single use
B Locally installed
С On a network
D utility​

Answers

Answer:

Single use i think

Explanation:

Answer: im pretty sure on a network.

Explanation:

Other Questions
Plz help with this question ASAP it would mean alot For some reason, in our history class, there are 14 more boys than there are girls. If a total 32 students are in the class, how many boys and how many girls are there Which ordered pairs make the inequality true?x+3y If you drive for 6 hours at a rate of 55 miles per hour, then how far would you have traveled?0330 milesO 300 miles0 660 miles0 165 miles What qualities do you think make a good friend? What things does a good friend do? Write 5-6 sentences in Spanish answering these questions.You will be graded on (a) correct use of verbs, (b) vocabulary usage, and (c) overall quality and accuracy of your response. Explain how plantation production of sugar and tobacco, and the mining of silver in the Americas impacted the economies of Europe, South America, and East Asia as well as global labor systems. (Write a Essay to explain your answer) CH3F contains polar covalent bond? what are signs of alcohol poising Convert the numbers to standard from 7.23x10^-10 Suppose that there are two types of tickets to a show: advance and same-day. The combined cost of one advance ticket and one same-day ticket is $60. For one performance, 40 advance tickets and 30 same-day tickets were sold. The total amount paid for the tickets was $2200. What was the price of each kind of ticket? Qu se entiende por la actitud y los cdigos compartidos? (En literatura) 12. ROSCALCULATE THE ARCLENGTH. ROUND TO THENEAREST TENTH.18063 11IQS Which statement best explains why the Exodus is an important event in the Jewish religion?A) It recalls the journey of the Hebrews from Ur to Canaan.B) It supported the idea that Canaan was the Promised Land.C) It describes the important role of Abraham in the Jewish faith.D) It tells the history of the migrations and settlements of the Jewish people. borrowed $10 million by signing a five-year note on December 31, 2015. Repayments of the principal are payable annually in installments of $2 million each. Purdue Farms makes the first payment on December 31, 2016 and then prepares its balance sheet. What amount will be reported as current and long-term liabilities, respectively, in connection with the note at December 31, 2016, after the first payment is made Find the principal. Annual rate of interest= 11% Period=3 years Total interest= 825 rupees Principal rupees Forms of EnergyThere are 2 categories of energy, kinetic and potential. 9.)Cici went shopping and spent a total of $45.28. She paidwith a $100 bill. How much change did she receive? Write anexpression and solve. what is an example of a participant observation? What volume (in mL) will a sample of F2 gas occupy in a syringe at 5.5 atm, if the F2 has a volume of 25.0 mL at 1.2 atm? Write an equation of the line. I need help plz