The program's results are as follows: the temperature is -89, the maximum temperature is 100, and indeed the temperature is 31.5.
Array? What do you mean?A data structure called an array consists of a collection of variables (values or variables), which are each identifiable by an array index or key. Depending on the programming language, additional data types that express groupings of values, such lists and strings, may overlapping (or be associated with) array types.
Briefing:#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
int min_temp = INT_MAX;
int max_temp = INT_MIN;
int sum=0;
int n,count=0;
cout << "enter the temperature : ";
cin >> n;
if(n == -1)
{
cout << "No data entered";
return 0;
}
do
{
if(n < min_temp)
{
min_temp = n;
}
if(n > max_temp)
{
max_temp = n;
}
sum = sum+n;
count++;
cout << "enter the temperature : ";
cin >> n;
}while(n!=-100);
float avg = (float)(sum)/(float)(count);
cout << "Minimum Temperature is " << min_temp << endl;
cout << "MAximum Temperature is " << max_temp << endl;
cout << "Average Temperature is " << avg;
}
To know more about Array visit:
https://brainly.com/question/24275089
#SPJ4
You are designing a simple calculator program for young children to use. Right now, if they do something that the program didn’t expect, a message appears that reads, “User input deemed invalid.” What changes could you make so that the message would be more suitable for this audience?
In Python, you can use a try-except statement and raise an exception with a custom message.
For example:
try:
x = int(input())
except:
raise Exception("User input deemed invalid")
In JavaScript, you can try using a try-catch statement. You can use the 'throw' keyword to handle the error.
Alexandra went shopping for a new pair of pants. Sales tax where she lives is 5%. The price of the pair of pants is $47. Find the total price including tax. Round to the nearest cent.
Answer:
$49.35
Explanation:
Can someone help me with the following logical circuit, perform two actions. FIRST, convert the circuit into a logical
statement. SECOND, create a truth table based on the circuit/statement. (20 pts. each for statement and
truth table.
Creation of Truth Table Based on the logical statement, we can create a truth table as shown below:
A B (not A) (not A) and B (not A) and B or A A or (not A) and B 0 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1
The first two columns show the input values, the next column shows the output of the NOT gate, then the output of the AND gate, then the output of the OR gate and finally the output of the logical statement.
We can observe that the output of the logical statement is the same as the output of the OR gate.
Given the logical circuit, we are required to perform two actions on it. Firstly, convert the circuit into a logical statement. Secondly, create a truth table based on the circuit/statement. Let's understand how to do these actions one by one:Conversion of Circuit into Logical Statement.
The given circuit contains three components: NOT gate, AND gate and OR gate. Let's analyze the working of this circuit. The two input variables A and B are first passed through the NOT gate, which gives the opposite of the input signal.
Then the NOT gate output is passed through the AND gate along with the input variable B. The output of the AND gate is then passed through the OR gate along with the input variable A.We can create a logical statement based on this working as: (not A) and B or A. This can also be represented as A or (not A) and B. Either of these statements is correct and can be used to construct the truth table.
Creation of Truth Table Based on the logical statement, we can create a truth table as shown below:
A B (not A) (not A) and B (not A) and B or A A or (not A) and B 0 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1
In the truth table, we have all possible combinations of input variables A and B and their corresponding outputs for each component of the circuit.
The first two columns show the input values, the next column shows the output of the NOT gate, then the output of the AND gate, then the output of the OR gate and finally the output of the logical statement.
We can observe that the output of the logical statement is the same as the output of the OR gate.
For more such questions on Truth Table, click on:
https://brainly.com/question/13425324
#SPJ8
Write a program that receives an character and displays its Unicode. Here is a sample run: Enter an character: E The Unicode for the character E is 69
Answer:
The program written in Python programming language is as follows;
Comments are not used because the code is self explanatory; However, see explanation section for line by line explanation
char = input("Enter a character: ")
print("The Unicode for the character " + char[0] + " is", ord(char[0]))
Explanation:
Line 1 of the program prompts the user for an input of a character
char = input("Enter a character: ")
The next line prints the Unicode equivalent of the input text. However, if the input length is more than 1, the program will only consider the first character and discard the rest
print("The Unicode for the character " + char[0] + " is", ord(char[0]))
Modify theme in excel
Answer:
Explanation:
Theme may be explained as a group of different formatting options such as appearance, color, font size and so on, which could be applied on a workbook simultaneously (without having to manually format each change to the document one after the other.) Once a certain theme is selected, all formating options related to the theme is applied to the document. Themes are located in the page layout tab in excel. However, one can modify or edit each of the individual properties or options of a certain theme. Such that by the time, the theme modification would have been effected.
Evie clicks through her presentation slides and realizes they all have transition effects coming from the same location, from the bottom up. She wants to change some of the slides to have transition effects from different locations. What steps can she take change slide transition effects
Answer:
1) Choose Slide
2) Transition Tab
3) Transition To This Slide
4) Select New Transition
Explanation:
There are 4 main steps that Evie needs to take in order to accomplish this. First, she needs to choose the slide that she wants to apply the transition to. Secondly, she needs to click on the Transitions Tab at the top of the application. Thirdly, she needs to go to the "Transition to this Slide" section of the tab. Lastly, she needs to choose one of the available animation/transitions from the list of options. This will apply that transition effect to that slide, so that when she switches to that slide it performs the animation.
Answer:
Transition Tab > Transition To This Slide > Select New Transition
Explanation:
In Java only please:
4.15 LAB: Mad Lib - loops
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways.
Write a program that takes a string and an integer as input, and outputs a sentence using the input values as shown in the example below. The program repeats until the input string is quit and disregards the integer input that follows.
Ex: If the input is:
apples 5
shoes 2
quit 0
the output is:
Eating 5 apples a day keeps you happy and healthy.
Eating 2 shoes a day keeps you happy and healthy
Answer:
Explanation:
import java.util.Scanner;
public class MadLibs {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String word;
int number;
do {
System.out.print("Enter a word: ");
word = input.next();
if (word.equals("quit")) {
break;
}
System.out.print("Enter a number: ");
number = input.nextInt();
System.out.println("Eating " + number + " " + word + " a day keeps you happy and healthy.");
} while (true);
System.out.println("Goodbye!");
}
}
In this program, we use a do-while loop to repeatedly ask the user for a word and a number. The loop continues until the user enters the word "quit". Inside the loop, we read the input values using Scanner and then output the sentence using the input values.
Make sure to save the program with the filename "MadLibs.java" and compile and run it using a Java compiler or IDE.
The acquisition of knowledge is learning true or false
Answer:
True
Explanation:
What are the core steps to add revisions or features to a project?(1 point)
Responses
Evaluate feasibility of the goals, create a list of functionality requirements, and develop the requirements of the feature.
Evaluate feasibility of the goals, develop programming solutions, and evaluate how well the solutions address the goals.
understand the goals, evaluate the impact on the project, create a list of functionality requirements, and develop the requirements of the feature.
Communicate with the client, create a sprint backlog, develop the project, and evaluate how well the solution fits the requirements.
The core steps to add revisions or features to a project are ""Understand the goals, evaluate the impact on the project, create a list of functionality requirements, and develop the requirements of the feature." (Option C)
How is this so?
The core steps to add revisions or features to a project include understanding the goals,evaluating the impact on the project, creating a list of functionality requirements,and developing the requirements of the feature.
These steps ensure that the goals are clear, the impact is assessed, and the necessary functionality is identified and implemented effectively.
Learn more about project management at:
https://brainly.com/question/16927451
#SPJ1
Anyone help pls ? Complete the code below to add css to make the background of the web page orange.
< html>
Answer:
In HTML file
<body style="background-color:orange;">
Or
In CSS file
body {
background-color: orange;
}
Explain why decomposition will be used in creating the algorithm for the game including two dice.
PLEASE HELP
Find five secure websites. For each site, include the following:
the name of the site
a link to the site
a screenshot of the security icon for each specific site
a description of how you knew the site was secure
Use your own words and complete sentences when explaining how you knew the site was secure.
The name of the secure websites are given as follows:
Each of the above websites had the security icon on the top left corner of the address bar just before the above domain names.
What is Website Security?The protection of personal and corporate public-facing websites from cyberattacks is referred to as website security.
It also refers to any program or activity done to avoid website exploitation in any way or to ensure that website data is not accessible to cybercriminals.
Businesses that do not have a proactive security policy risk virus spread, as well as attacks on other websites, networks, and IT infrastructures.
Web-based threats, also known as online threats, are a type of cybersecurity risk that can create an unwanted occurrence or action over the internet. End-user weaknesses, web service programmers, or web services themselves enable online threats.
Learn more about website security:
https://brainly.com/question/28269688
#SPJ1
Which HTML tag is used to add a paragraph to a web page?
Answer:
the HTML tag for the paragraph is <p>.
Explanation:
To insert the paragraph in the website, use the <p> tag to start the paragraph and to end the paragraph, use the closing paragraph tag that is </p>.
The paragraph tag is used inside the body tag. for example,
<html>
<head></head>
<body>
<p>this is a paragraph
</p>
</body>
</html>
I am working on 8.8.6 "Totals of Lots of Rolls" in codeHS javascript and
I do not know what to do can someone help me?
Using the knowledge in computational language in JAVA it is possible to write a code that rolls a 6-sided die 100 times.
Writting the code:var counts = [0, 0, 0, 0, 0, 0, 0];
for (var i = 0; i < 100; i++) {
counts[Math.floor(1 + Math.random() * 6)]++;
}
console.log('You rolled ' + counts[1] + ' ones.');
console.log('You rolled ' + counts[2] + ' twos.');
console.log('You rolled ' + counts[3] + ' threes.');
console.log('You rolled ' + counts[4] + ' fours.');
console.log('You rolled ' + counts[5] + ' fives.');
console.log('You rolled ' + counts[6] + ' sixes.');
See more about JAVA at brainly.com/question/12975450
#SPJ1
The Boolean operators include which of the following?
A. and, or, not
B. to, for, from
C. a, an, the
D. is, are, not
Answer:
The answer is A. and, or, not
Explanation:
Using a Boolean search can help narrow your results. A Boolean search is a query that uses the Boolean operators AND, OR, and NOT, along with quotation marks, to limit the number of results. For example, searching the terms Alexander the Great AND conquests will provide results about Alexander, great, and their conquests.
Assume the variable s is a String and index is an int. Write an if-else statement that assigns 100 to index if the value of s would come between "mortgage" and "mortuary" in the dictionary. Otherwise, assign 0 to index.
Using the knowledge in computational language in python it is possible to write a code that Assume the variable s is a String and index is an int.
Writting the code:Assume the variable s is a String
and index is an int
an if-else statement that assigns 100 to index
if the value of s would come between "mortgage" and "mortuary" in the dictionary
Otherwise, assign 0 to index
is
if(s.compareTo("mortgage")>0 && s.compareTo("mortuary")<0)
{
index = 100;
}
else
{
index = 0;
}
See more about JAVA at brainly.com/question/12975450
#SPJ1
Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay the hourly rate for the hours up to 40 and 1.5 times the hourly rate for all hours worked above 40 hours. Use 45 hours and a rate of 10.50 per hour to test the program (the pay should be 498.75).
Answer:
Following is the program in the python language
hr = input("input hours:") #Read input by user
h1 = float(hr)
rate =input("Input Rate:") #Read RATE BY USER
r1 = float(rate) #CONVERT INTO FLOAT
if h1 <= 40: #check condition
t=h1 * r1
print (t) #DISPLAY
else :#else block
t1=(40 * r1) + (h1 -40) * r1 * 1.5
print('The pay is :')
print(t1)#DISPLAY
Output:
input hours:45
Input Rate:10.50
The pay is :
498.75
Explanation:
Following are the description of program
Read the value of hour in the "hr" variable and convert into the float value in the "h1" variable .Read the value of rate in the " rate" variable and convert into the float value in the "r1" variable .After that check the condition of hour if block if the hour is less then or equal to 40 then it multiplied h1 *t1 otherwise else block will be executed and print the value of pay .
if-else AND if-elif-else
need at minimum two sets of if, one must contain elif
comparison operators
>, <, >=, <=, !=, ==
used at least three times
logical operator
and, or, not
used at least once
while loop AND for loop
both a while loop and a for loop must be used
while loop
based on user input
be sure to include / update your loop control variable
must include a count variable that counts how many times the while loop runs
for loop must include one version of the range function
range(x), range(x,y), or range(x,y,z)
comments
# this line describes the following code
comments are essential, make sure they are useful and informative (I do read them)
at least 40 lines of code
this includes appropriate whitespace and comments
python
Based on the image, one can see an example of Python code that is said to be able to meets the requirements that are given in the question:
What is the python?The code given is seen as a form of a Python script that tells more on the use of if-else as well as if-elif-else statements, also the use of comparison operators, logical operators, and others
Therefore, one need to know that the code is just a form of an example and it can or cannot not have a special functional purpose. It is one that is meant to tell more on the use of if-else, if-elif-else statements, etc.
Learn more about python from
https://brainly.com/question/26497128
#SPJ1
Write a function that receives three StaticArrays where the elements are already i n sorted order and returns a new Static Array only with those elements that appear i n all three i nput arrays. Original arrays should not be modified. If there are no elements that appear i n all three i nput arrays, return a Static Array with a single None element i n i t.
Answer:
Explanation:
The following code is written in Python. It is a function that takes the three arrays as parameters. It loops over the first array comparing to see if a number exists in the other arrays. If it finds a number in all three arrays it adds it to an array called same_elements. Finally, it prints the array.
def has_same_elements(arr1, arr2, arr3):
same_elements = []
for num1 in arr1:
if (num1 in arr2) and (num1 in arr3):
same_elements.append(num1)
else:
continue
print(same_elements)
why do you think the design Process is important for designers to implement when creating a design?
The design process is important for designers to implement when creating a design for several reasons:
Systematic approachProblem-solvingCollaborationWhat is the design Process?Systematic approach: The design process provides a systematic and organized approach to creating a design. It involves steps such as research, planning, ideation, prototyping, testing, and refinement. Following a structured process helps designers to approach their work in a methodical manner, ensuring that all aspects of the design are thoroughly considered and addressed.
Problem-solving: The design process helps designers to approach design as a problem-solving activity. It encourages designers to identify the needs and requirements of the target audience or users, define the problem statement, and generate creative solutions to address the problem effectively. The process allows for experimentation, iteration, and refinement of design ideas until the best solution is achieved.
Collaboration: The design process often involves collaboration among team members or stakeholders. It provides a framework for designers to work together, share ideas, gather feedback, and make informed decisions. Collaboration fosters creativity, diversity of perspectives, and collective ownership of the design, leading to better outcomes.
Read more about design Process here:
https://brainly.com/question/411733
#SPJ1
According to ACM and IEEE What are the most popular programming languages used in industry today
Python remains on top but is closely followed by C. Indeed, the combined popularity of C and the big C-like languages—C++ and C#—would outrank Python by some margin.
What is a programming language?A method of notation for creating computer programs is known as a programming language. The majority of formal programming languages are text-based, though they can also be graphical. They are a sort of programming language.
Large enterprises all across the world employ client-server applications, and Java is the programming language most often associated with their creation.
Learn more about programming language here:
https://brainly.com/question/16936315
#SPJ1
Given all of the limitations of MBR, is it still relevant in current day use?
Explanation:
MBR does have its limitations. For starters, MBR only works with disks up to 2 TB in size. MBR also only supports up to four primary partitions—if you want more, you have to make one of your primary partitions an “extended partition” and create logical partitions inside it.
Mối quan hệ giữa đối tượng và lớp
1. Lớp có trước, đối tượng có sau, đối tượng là thành phần của lớp
2. Lớp là tập hợp các đối tượng có cùng kiểu dữ liệu nhưng khác nhau về các phương thức
3. Đối tượng là thể hiện của lớp, một lớp có nhiều đối tượng cùng thành phần cấu trúc
4. Đối tượng đại diện cho lớp, mỗi lớp chỉ có một đối tượng
Answer:
please write in english i cannot understand
Explanation:
Do you think it's easier to be mean online than offline? why?
Answer:
Yes because on online we can talk all we want and they don't know us irl so it's funny lol
Explanation:
4. Return the card number, first name, last name, and average late fee of each customer. Name this column as "Fee".
5. Return the authors whose first names are shorter than all last names.
6. Return the first 10 borrowing which late fee is unknown.
How do I write these using Oracle SQL sub selects?
Answer:
To write these queries using Oracle SQL sub selects, the following syntax can be used:
1. Return the card number, first name, last name, and average late fee of each customer. Name this column as "Fee".
SELECT card_number, first_name, last_name, AVG(late_fee) AS "Fee"
FROM customers
GROUP BY card_number, first_name, last_name;
2. Return the authors whose first names are shorter than all last names.
SELECT *
FROM authors
WHERE LENGTH(first_name) < ALL (SELECT LENGTH(last_name) FROM authors);
3. Return the first 10 borrowing which late fee is unknown.
SELECT *
FROM borrowings
WHERE late_fee IS NULL
AND ROWNUM <= 10;
Explanation:
In these queries, sub selects are used to select specific data from a table and use it in the main query. For example, in the second query, a sub select is used to select the length of all last names from the authors table, and this data is then used in the main query to filter the authors whose first names are shorter than all last names. In the third query, a sub select is used to filter the borrowings with unknown late fees, and the main query is used to limit the result to the first 10 rows.
Plz answer me will mark as brainliest
Answer:
True
Operating System
Booting
Lossy compression means that when you compress the file, you're going to lose some of the detail.
True
False
Question 2
InDesign is the industry standard for editing photos.
True
False
Question 3
Serif fonts are great for print media, while sans serif fonts are best for digital media.
True
False
Question 4
You should avoid using elements of photography such as repetition or symmetry in your photography.
True
False
Lossy compression means that when you compress the file, you're going to lose some of the detail is a true statement.
2. InDesign is the industry standard for editing photos is a true statement.
3. Serif fonts are great for print media, while sans serif fonts are best for digital media is a true statement.
4. You should avoid using elements of photography such as repetition or symmetry in your photography is a false statement.
What lossy compression means?The term lossy compression is known to be done to a data in a file and it is one where the data of the file is removed and is not saved to its original form after it has undergone decompression.
Note that data here tends to be permanently deleted, which is the reason this method is said to be known as an irreversible compression method.
Therefore, Lossy compression means that when you compress the file, you're going to lose some of the detail is a true statement.
Learn more about File compression from
https://brainly.com/question/9158961
#SPJ1
For a regression problem, a student trained a linear regression model and obtained the following prediction line:
Which of the following answers cannot explain the model it received?
Choose only one answer (the most correct answer):
A.The features have a constant low value, which is less than 0
B.The features have a high positive value greater than 100
C.The features are not related to the target value
D.The learning rate (alpha) is too high
The learning rate (alpha) is too high cannot explain the model it received.
The learning rate, which is a hyperparameter in the training process, is not applicable or relevant to the explanation of the given linear regression model because the model equation does not involve any learning rate term. Therefore, the learning rate being too high.
The given linear regression model is:
y = 0.x1 + 0.x2 - 7
To determine which answer cannot explain the model, let's analyze each option:
A. The features have a constant low value, which is less than 0: This option does not provide enough information to assess its impact on the model. The constant low value could affect the model's performance depending on the range and distribution of the features, but without specific details, we cannot determine if it can or cannot explain the model.
B. The features have a high positive value greater than 100: Similar to option A, this answer does not give sufficient information to evaluate its impact on the model. The high positive value might affect the model's performance, but without further details, we cannot determine its explanatory power.
C. The features are not related to the target value: This option can potentially explain the model if the features are indeed unrelated to the target value. In such a case, the linear regression model might not capture the underlying relationship and may not provide accurate predictions. Therefore, this option can explain the model.
D. The learning rate (alpha) is too high: The learning rate is not explicitly present in the given equation, y = 0.x1 + 0.x2 - 7. Thus, the learning rate cannot explain the model because it is not a factor directly involved in this particular equation.
for similar questions on regression.
https://brainly.com/question/29564436
#SPJ8
Errors can be syntax errors or logic errors (the code works, but not as intended).
Which of the following statements contains an error?
I. String firstInitial = firstName.subString(0,3);
II. String lastName = in.nextLine();
III. String name = firstInitial + ". " + lastName;
I only
II only
III only
I and II only
II and III only
Answer:
I. String firstInitial = firstName.subString(0,3);
Explanation:
I - The first initial should always be the first character and not a substring from 0 to 3. For example the substring 0 to 3 of Daniel would be "Dani" and not "D". So, it is a logic error.
I am assuming the name variable needs to be like "D. lastName" and not "Dani. lastName"
Which format has the largest file size?