Answer:
Here is the Python program:
COOKIES_PER_BAG = 40 #sets constant value for bag of cookies
SERVINGS_PER_BAG = 10 #sets constant value for serving in bag
CALORIES_PER_SERVING = 300 #sets constant value servings per bag
cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate
totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user
print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed
Explanation:
The algorithm is:
StartDeclare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVINGSet COOKIES_PER_BAG to 40Set SERVINGS_PER_BAG to 10Set CALORIES_PER_SERVING to 300Input cookiesCalculate totalCalories: totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))Display totalCaloriesI will explain the program with an example:
Lets say user enters 5 as cookies he or she ate so
cookies = 5
Now total calories are computed as:
totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));
This becomes:
totalCalories = 5 * (300/40/10)
totalCalories = 5 * (300/4)
totalCalories = 5 * 75
totalCalories = 375
The screenshot of program along with its output is attached.
Instagram
Hello everyone hope you are doing well,
I am having this issue where i don’t receive notifications from instagram.
I tried signing in from another device and it workedd
( both phones are ios and same settings)
What should i do to receive notifications?
Please help
Thanks!
What do you think will happen if the steps in scientific method are in different order?
What questions would you ask an employer at a job interview?
Answer:
8 Questions You Should Absolutely Ask An Interviewer
QUESTION #1: What do the day-to-day responsibilities of the role look like? ...
QUESTION #2: What are the company's values? ...
QUESTION #3: What's your favorite part about working at the company? ...
QUESTION #4: What does success look like in this position, and how do you measure it?
Explanation:
I hope this answer is Wright ,So please mark as brainlist answers
Which online text source would include a review of a new TV show?
an academic journal
a blog
an e-book
an encyclopedia
Answer:
Blog
Explanation:
Online text sources include blogs, e-books, encyclopaedias, and e-zines. As a result, options A, B, C, and D are correct.
What is a text source?A source is a book or other material that contains the data that has been used, whereas a citation is the actual statement of the starting point. They were researchers who also worked as professors, writers, and other professionals, and they published books and articles.
Online text sources are those that can be accessed from anywhere and are available on the internet. The online text shows that anyone can see or exceed including blogs, e-books, encyclopaedias, and e-zines.
These are available for further studies and research. Also to give information this can be a source. Therefore, options A, B, C, and E is the correct option.
Learn more about text sources, here:
brainly.com/question/19131568
#SPJ6
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.
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")
What is a malicious actor essentially looking for when attempting a network attack?
Answer:
information of personnel
Explanation:
The malicious actor that is essentially looked for when attempting a network attack is information of personnel.
Who are malicious actors?
An entity that is partially or completely accountable for an occurrence. It has an impact on or the potential to have an impact on the security of an organization and is referred to as a threat actor, also known as a malicious actor or bad actor.
Actors are typically divided into three categories in threat intelligence: partner, internal, and external. Any individual or group that wreaking havoc online is referred to as a threat actor, also known as a malevolent actor.
They carry out disruptive assaults on people or organizations by taking advantage of holes in computers, networks, and other systems.
Therefore, when attempting a network attack, personnel information is the main harmful actor that is sought after.
To learn more about malicious factors, refer to the link:
https://brainly.com/question/29848232
#SPJ2
Type the correct answer in the box
in which phishing technique are URLs of the spoofed organization misspelled?
anon
is a phishing technique in which URLs of the spoofed organization are misspelled
Answer: Link manipulation
Explanation:
Answer:
Typo Squatting
Explanation:
Write an if statement that assigns 20 to the variable y, and assigns 40 to the variable z if the variable x is greater than 100. python
Answer:
if x > 100:
y = 20
z = 40
Explanation:
This line checks if variable x is greater than 100
if x > 100:
This line assigns 20 to y
y = 20
This line assigns 40 to z
z = 40
The if statement that assigns 20 to the variable y, and assigns 40 to the variable z if the variable x is greater than 100 is as follows:
x = int(input("input an integer number: "))
if x > 100:
y = 20
z = 40
print(y)
print(z)
The first code we ask the user to input an integer number and stored it in the
variable x.
If the user input is greater than x, then y is assigned to 20 and z is assigned to 40.
We print the assigned value of y and z if the user entered an input greater
than 100.
learn more: https://brainly.com/question/19036769?referrer=searchResults
To write a letter using Word Online, which document layout should you choose? ASAP PLZ!
Traditional... See image below
Answer: new blank document
Explanation: trust is key
In this exercise you will debug the code which has been provided in the starter file. The code is intended to take two strings, s1 and s2 followed by a whole number, n, as inputs from the user, then print a string made up of the first n letters of s1 and the last n letters of s2. Your job is to fix the errors in the code so it performs as expected (see the sample run for an example).
Sample run
Enter first string
sausage
Enter second string
races
Enter number of letters from each word
3
sauces
Note: you are not expected to make your code work when n is bigger than the length of either string.
1 import java.util.Scanner;
2
3 public class 02_14_Activity_one {
4 public static void main(String[] args) {
5
6 Scanner scan = Scanner(System.in);
7
8 //Get first string
9 System.out.println("Enter first string");
10 String s1 = nextLine(); 1
11
12 //Get second string
13 System.out.println("Enter second string");
14 String s2 = Scanner.nextLine();
15
16 //Get number of letters to use from each string
17 System.out.println("Enter number of letters from each word");
18 String n = scan.nextLine();
19
20 //Print start of first string and end of second string
21 System.out.println(s1.substring(1,n-1) + s2.substring(s1.length()-n));
22
23
24 }
Answer:
Here is the corrected program:
import java.util.Scanner; //to accept input from user
public class 02_14_Activity_one { //class name
public static void main(String[] args) { //start of main method
Scanner scan = new Scanner(System.in); //creates Scanner class object
System.out.println("Enter first string"); //prompts user to enter first string
String s1 = scan.nextLine(); //reads input string from user
System.out.println("Enter second string"); //prompts user to enter second string
String s2 = scan.nextLine(); //reads second input string from user
System.out.println("Enter number of letters from each word"); //enter n
int n = scan.nextInt(); //reads value of integer n from user
System.out.println(s1.substring(0,n) + s2.substring(s2.length() - n ));
} } //uses substring method to print a string made up of the first n letters of s1 and the last n letters of s2.
Explanation:
The errors were:
1.
Scanner scan = Scanner(System.in);
Here new keyword is missing to create object scan of Scanner class.
Corrected statement:
Scanner scan = new Scanner(System.in);
2.
String s1 = nextLine();
Here object scan is missing to call nextLine() method of class Scanner
Corrected statement:
String s1 = scan.nextLine();
3.
String s2 = Scanner.nextLine();
Here class is used instead of its object scan to access the method nextLine
Corrected statement:
String s2 = scan.nextLine();
4.
String n = scan.nextLine();
Here n is of type String but n is a whole number so it should be of type int. Also the method nextInt will be used to scan and accept an integer value
Corrected statement:
int n = scan.nextInt();
5.
System.out.println(s1.substring(1,n-1) + s2.substring(s1.length()-n));
This statement is also not correct
Corrected statement:
System.out.println(s1.substring(0,n) + s2.substring(s2.length() - n ));
This works as follows:
s1.substring(0,n) uses substring method to return a new string that is a substring of this s1. The substring begins at the 0th index of s1 and extends to the character at index n.
s2.substring(s2.length() - n ) uses substring method to return a new string that is a substring of this s2. The substring then uses length() method to get the length of s2 and subtracts integer n from it and thus returns the last n characters of s2.
The screenshot of program along with its output is attached.
What does the measurement tell you?
Schedule performance index
Answer:
how close the project is to being completed compared to the schedule/ how far ahead or behind schedule the project is, relative to the overall project
Explanation:
Write a function, maxRadius, to find an index of a Planet with the largest radius in the array. The function should
Answer:
Follows are the code to this question:
#include<iostream>//defining header file
#include<string>//defining header file
using namespace std;
const double Pi =3.141592653589793238463;//defining double constant variable
class Planet
{
private:
string planet_name;//defining string variable
double radius;//defining double variable
public:
Planet()//defining default constructor
{
this->planet_name="";//use this keyword to hold value
this->radius=0.0;//use this keyword to hold value
}
Planet(string name, double radius)//defining parameterized constructor
{
this->planet_name = name;//use this keyword to hold value
this->radius=radius;//use this keyword to hold value
}
string getName() const//defining getName method
{
return this->planet_name;//use return keyword for return string value
}
double getRadius() const//defining getRadius method
{
return this->radius;//use return keyword for return radius value
}
double getVolume() const //defining getVolume method
{
return 4*radius*radius*radius*Pi/3;////use return keyword for return volume value
}
};
int maxRadius(Planet* planets, int s)//defining a method maxRadius that accept two parameter
{
double maxRadius=0;//defining double variable
int index_of_max_radius=-1;//defining integer variable
for(int index=0; index<s; index++)//defining for loop for calculate index of radius
{
if(planets[index].getRadius()>maxRadius)//defining if block to check radius
{
maxRadius = planets[index].getRadius();//use maxRadius to hold value
index_of_max_radius=index;//hold index value
}
}
return index_of_max_radius;//return index value
}
int main()//defining main method
{
Planet planets[5];//defining array as class name
planets[0] = Planet("On A Cob Planet",1234);//use array to assign value
planets[1] = Planet("Bird World",4321);//use array to assign value
int idx = maxRadius(planets,2);//defining integer variable call method maxRadius
cout<<planets[idx].getName()<<endl;//print value by calling getName method
cout<<planets[idx].getRadius()<<endl;//print value by calling getRadius method
cout<<planets[idx].getVolume()<<endl;//print value by calling getVolume method
}
Output:
Bird World
4321
3.37941e+11
Explanation:
please find the complete question in the attached file:
In the above-program code, a double constant variable "Pi" is defined that holds a value, in the next step, a class "Planet" is defined, in the class a default and parameter constructor that is defined that hold values.
In the next step, a get method is used that return value, that is "planet_name, radius, and volume".
In the next step, a method "maxRadius" is defined that accepts two-parameter and calculate the index value, in the main method class type array is defined, and use an array to hold value and defined "idx" to call "maxRadius" method and use print method to call get method.
1.2
Is media a curse or a blessing? Explain.
Answer:
i think its both because if there is misunderstanding between media and government then the media distroys the government and if there us no misunderstanding between media and government and if it goes smoothly then its like a blessing for government
Answer:
Media is a blessing...a curse as well when it's misguiding the world and hiding the real sinner and juxtaposing the culprit as the saviour
Assume you are using an array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements, dequeue 5 elements, and then enqueue 1 more element. Which index of the internal array elements holds the value of that last element you enqueued
Answer:
The answer is "5".
Explanation:
In the queue based-array, it follows the FIFO method, and in the question, it is declared that a queue has a capacity of 10 elements, and insert the 5 elements in the queue and after inserting it enqueue 5 elements and at the last, it inserts an element 1 more element on the queue and indexing of array always start from 0, that's why its last element index value is 5.
What is a piece of information sent to a function
Answer:
the information sent to a function is the 'input'.
or maybe not hehe
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).
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
Select the items that you may see on a Windows desktop.
Shortcuts to frequently used programs
System tray
Recycle Bin
Taskbar
O Database
Icons
O Quick Launch
Answer:
You may see:
The taskbar
The startmenu
Program icons within the taskbar
Shortcuts
Documents
Folders
Media files
Text files
The Recycle Bin
and so on...
Explain why it is not necessary for a program to be completely free of defects before it is delivered to its customers?
Answer:
Testing is done to show that a program is capable of performing all of its functions and also it is done to detect defects.
It is not always possible to deliver a 100 percent defect free program
A program should not be completely free of all defects before they are delivered if:
1. The remaining defects are not really something that can be taken as serious that may cause the system to be corrupt
2. The remaining defects are recoverable and there is an available recovery function that would bring about minimum disruption when in use.
3. The benefits to the customer are more than the issues that may come up as a result of the remaining defects in the system.
Cable television systems originated with the invention of a particular component. What was this component called?
Answer:
Cable television is a system of delivering television programming to consumers via radio frequency (RF) signals transmitted through coaxial cables, or in more recent systems, light pulses through fibre-optic cables. This contrasts with broadcast television (also known as terrestrial television), in which the television signal is transmitted over the air by radio waves and received by a television antenna attached to the television; or satellite television, in which the television signal is transmitted by a communications satellite orbiting the Earth and received by a satellite dish on the roof. FM radio programming, high-speed Internet, telephone services, and similar non-television services may also be provided through these cables. Analog television was standard in the 20th century, but since the 2000s, cable systems have been upgraded to digital cable operation.Explanation:
[tex]hii[/tex]have a nice day ✌️✌️Cable television systems originated with the invention of a particular component. The component is a coaxial cable. The correct option is A.
What is a cable television system?Radiofrequency (RF) signals are transferred through coaxial cables, or in more current systems, light pulses are transmitted through fiber-optic cables, to deliver television programming to viewers via cable television networks.
This is in contrast to satellite television, which transmits the television signal via a communications satellite orbiting the Earth and receives it via a satellite dish.
It broadcast television, in which the television signal is transmitted over the air by radio waves and received by a television antenna attached to the television.
Therefore, the correct option is A. coaxial cable.
To learn more about the cable television system, refer to the link:
https://brainly.com/question/29059599
#SPJ2
The question is incomplete. Your most probably complete question is given below:
A. coaxial cable
B. analog transmission
C. digital transmission
D. community antenna
Your program is going to compare the distinct salaries of two individuals for the last 5 years. If the salary for the two individual for a particular year is exactly the same, you should print an error and make the user enter both the salaries again for that year. (The condition is that there salaries should not be the exact same).Your program should accept from the user the salaries for each individual one year at a time. When the user is finished entering the salaries, the program should print which individual made the highest total salary over the 5 year period. This is the individual whose salary is the highest.You have to use arrays and loops in this assignment.In the sample output examples, what the user entered is shownin italics.Welcome to the winning card program.
Enter the salary individual 1 got in year 1>10000
Enter the salary individual 2 got in year 1 >50000
Enter the salary individual 1 got in year 2 >30000
Enter the salary individual 2 got in year 2 >50000
Enter the salary individual 1 got in year 3>35000
Enter the salary individual 2 got in year 3 >105000
Enter the salary individual 1 got in year 4>85000
Enter the salary individual 2 got in year 4 >68000
Enter the salary individual 1 got in year 5>75000
Enter the salary individual 2 got in year 5 >100000
Individual 2 has the highest salary
In python:
i = 1
lst1 = ([])
lst2 = ([])
while i <= 5:
person1 = int(input("Enter the salary individual 1 got in year {}".format(i)))
person2 = int(input("Enter the salary individual 1 got in year {}".format(i)))
lst1.append(person1)
lst2.append(person2)
i += 1
if sum(lst1) > sum(lst2):
print("Individual 1 has the highest salary")
else:
print("Individual 2 has the highest salary")
This works correctly if the two individuals do not end up with the same salary overall.
the company has finished designing a software program but users aren't sure how to use it
Answer:
The company should go back into the company and make it a little more easier to use or the company should put out an announcement or something so the people trying to use it know how
Explanation:
Mark me the brainliest please and rate me
Answer:
Several people in the human resources department need new software installed. An employee has an idea for a software program that can save the company time, but doesn't know how to write it.
Explanation:
Which of the following best describes open-source code software?
O A. a type of software that is open to the public and can be modified
B. a type of software that is free to download, but cannot be modified
C. a type of software that is locked, but can be modified
D. a type of software that has already been modified
Answer:
A. a type of software that is open to the public and can be modified.
Explanation:
Open-source refers to anything that is released under a license in which the original owner grants others the right to change, use, and distribute the material for any purpose.
Open-source code software is described as a type of software that is open to the public and can be modified. The correct option is A.
What is open-source code?Open-source software is computer software that is distributed under a licence that allows users to use, study, change, and distribute the software and its source code to anyone and for any purpose.
Open-source software can be created collaboratively and publicly. Open-source refers to anything that is released under a licence that allows others to change, use, and distribute the material for any purpose.
Therefore, open-source code software is defined as software that is freely available to the public and can be modified. A is the correct answer.
To know more about open-source code follow
https://brainly.com/question/15039221
#SPJ6
Alice just wrote a new app using Python. She tested her code and noticed some of her lines of code are out of order. Which principal of programing should Alice review?
Answer:
sequencing
Explanation:
from flvs
Answer:
Sequencing
Explanation:
When investigators find evidentiary items that aren't specified in a warrant or under probable cause what type of doctrine applies
Works in the public domain have copyright that are expired or abandoned true or false
Answer:
False
Explanation:
Only one of the two are true. Works in the public domain have a copyright that has expired only. E.g. Works of classical music artist, are almost always expired, in accorance with American Copyright law. Abandoning a copyright doesn't do anything because so long the copyright has remained unexpired, the copyright remains. Thats why it can take decades for a new movie in a series to release, like "IT" by Stephen King. The copyright hasn't expired but rather was 'abandoned'. Before "IT" 2017 was relasesed, the copyright was abandoned.
Question 8 (3 points) Which of the following is an external factor that affects the price of a product? Choose the answer.
sales salaries
marketing strategy
competition
production cost
Answer: tax
Explanation: could effect the cost of items because the tax makes the price higher
oh sorry i did not see the whole question
this is the wrong awnser
The hide/unhide feature only hides in the
_____ view?
Answer: main...?
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
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
The SQL SELECT command is capable of executing ____.
a. only relational Select operations
b. only relational Select and Project operations but not relational Join operations
c. relational Select, Project, and Join operations individually but not in combination
d. relational Select, Project, and Join operations individually or in combination
e. None of the above.
Answer:
d. relational Select, Project, and Join operations individually or in combination
Explanation:
SQL is short for structured query language. The SQL Select command allows the user to obtain data from a database. After the data is computed, the output is in a tabular form which is known as the result set.
All the queries begin with the Select command. The column and the table names are clearly noted in the instructions. This command can also execute projects and join several operations in combination or individually.
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
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