Answer:
All you got to do is type System.out printIn("Study English) etc...
Explanation:
Look at the answer to see if it is right.
Find the maximum value and minimum value in below mention code. Assign the maximum value to maxMiles, and the minimum value to minMiles. Sample output for the given program:
Min miles: -10
Max miles: 40
Here's what I have so far:
import java.util.Scanner;
public class ArraysKeyValue {
public static void main (String [] args) {
final int NUM_ROWS = 2;
final int NUM_COLS = 2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i = 0;
int j = 0;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
milesTracker[0][0] = -10;
milesTracker[0][1] = 20;
milesTracker[1][0] = 30;
milesTracker[1][1] = 40;
//edit from here
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] > maxMiles){
maxMiles = milesTracker[i][j];
}
}
}
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] < minMiles){
minMiles = milesTracker[i][j];
}
}
}
//edit to here
System.out.println("Min miles: " + minMiles);
System.out.println("Max miles: " + maxMiles);
}
Answer:
Code works perfectly
Explanation:
There is nothing wrong with your program as it runs perfectly and displays the expected results.
You may need to compile with another compiler if you're not getting the required results.
I've added the source code as an attachment (unedited)
g Unlike when you create a String, when you create a StringBuilder, you must use the keyword ____________.
Answer:
Unlike when you create a String, when you create a StringBuilder, you must use the keyword new
Explanation:
Strings are used in programming which also opens the way for StringBuilder to be used too. In javascript, for instance, variables are useful for storing data, We have "Let" and "const" variables. Const variables cannot be changed after they’re created. The data stored are in types an example is a string. Strings allow one to write a value and store the result in a variable.
For example, using the dot operator, when you:
console.log('love'.length); // Prints 4
Note that console.log() allows the computer to evaluate the expression inside the parentheses and print that result to the console.
.length prints 4 as the result. This shows how the string has a property that stores the number of characters in that string.
StringBuilder with the keyword "new" is used when we want to change or modify data property stored in a string.
What is one reason to create a study check list
PLEASE HURRY!!
Look at the image below!
Ignore the answer that I had accidentally selected.
the weight variable is an integer and the input is 115.6. Integers cannot have decimals, therefore, the output is 115.
Your answer should be 115
Which term describes a repository that holds pairs of entries to translate a domain name to an IP address? Select 2 options.
a. name server
b. domain server
c. root server
d. domain name system
e. domain lookup
Answer:
I said name server and domain name system, although it may not be correct.
Answer:
A and D
Explanation:
Write a Python 3 script in PyCharm that will simulate the game of "Rock, Paper, Scissors": Display a header and the simple rules of RPS Prompt player_1 for their move To make sure player_2 can't see what player_1's move was, insert: print('*** NO CHEATING ***\n\n' * 20) Prompt player_2 for their move Design and develop an IF-ELSE structure to play the game IF player_1's move equivalent to player_2's move, "It's a tie" "rock" beats "scissors" "scissors" beats "paper" "paper" beats "rock" Make sure you test for valid input!!
Answer:
'''
Rock, Paper, Scissors:
The Rules:
If player1's move equivalent to player2's move, "It's a tie".
"rock" beats "scissors", "scissors" beats "paper", and "paper" beats "rock"
'''
player_1 = input("Player 1's move: ")
print('*** NO CHEATING ***' * 20)
player_2 = input("Player 2's move: ")
if player_1 or player_2 not in ["rock", "paper", "scissors"]:
print("Invalid input!")
if player_1 == player_2:
print("It's a tie")
else:
if player_1 == "rock":
if player_2 == "scissors":
print("Player 1 won")
elif player_2 == "paper":
print("Player 2 won")
elif player_1 == "scissors":
if player_2 == "paper":
print("Player 1 won")
elif player_2 == "rock":
print("Player 2 won")
elif player_1 == "paper":
if player_2 == "rock":
print("Player 1 won")
elif player_2 == "scissors":
print("Player 2 won")
Explanation:
In the comment part, put the header and the rules of the game
Ask the user to enter the player1's move
Print the asterisks
Ask the user to enter the player2's move
If any of the input is not "rock", "paper", "scissors", state that the input is invalid
Check the inputs. If they are equal, print that it is a tie. Otherwise:
If player1's move is rock. Check player2's move. If it is "scissors", player1 wins. If it is "paper", player2 wins
If player1's move is scissors. Check player2's move. If it is "paper", player1 wins. If it is "rock", player2 wins
If player1's move is paper. Check player2's move. If it is "rock", player1 wins. If it is "scissors", player2 wins
to save a copy of word online document to your hard drive which option should you select? Save as , save, rename or download and copy
Answer:
The correct answer is Save as
The option that is to select to save a copy of word online document to hard drive is the save as option.
What is word document?The term “Word Document” is used to denote the document that is made in the Microsoft Word. This document is made in the proper format with the MS Word. This document can be safe electronically by selecting the save as option.
After saving that document, this will automatically save on the hard drive of the computer device of that user.
Therefore, option A is correct.
Learn more about the Word document, refer to:
https://brainly.com/question/15939168
#SPJ2
What are the four components of the Universal Systems Model?
Answer:
output, process, input, and feedback
Explanation:
Write a Python program that verifies the formula with the help of the Python Math module. Note that the trigonometric functions in the module act on the angles in radians. Your program should perform the following steps 3 times:_____.
1. Pick a random number between 0 and 180 degrees representing an angle in degrees, say Dangle
2. Convert the angle from degrees to radians, say Rangle
3. Use the Math module to find and print the values of sin(Rangle) and cos(Rangle), and
4. Compute and print the value of the above expression: sin^2(Rangle) + cos^2(Rangle).
You can then visually verify if the result printed is 1 (or close to it).
Hint: angle_in_radians = (angle_in_degrees * Pi)/180
Answer:
Written in Python
import math
import random
Dangle = random.randint(0,181)
pi = 22/7
Rangle = Dangle * pi/180
Rsin = math.sin(Rangle)
Rcos = math.cos(Rangle)
Result = Rsin**2 + Rcos**2
print("Result = "+str(Result))
Explanation:
The next two lines import math and random library respectively
import math
import random
This line generates a random integer between 0 and 180
Dangle = random.randint(0,181)
This line initializes pi to 22/7
pi = 22/7
This line converts angle to radians
Rangle = Dangle * pi/180
The next two lines calculate the sin and cosine of the angle in radians
Rsin = math.sin(Rangle)
Rcos = math.cos(Rangle)
This line implements sin^2 theta + cos^2 theta
Result = Rsin**2 + Rcos**2
This line prints the required Result
print("Result = "+str(Result))
1. Add an import statement above the class declaration to make the Scanner class available to your program.
2. In the main method, create a Scanner object and connect it to the System.in object.
3. Prompt the user to enter his/her first name.
4. Read the name from the keyboard using the nextLine method, and store it into a variable called firstName (you will need to declare any variables you use).
5. Prompt the user to enter his/her last name.
6. Read the name from the keyboard and store it in a variable called lastName.
7. Concatenate the firstName and lastName with a space between them and store the result in a variable called fullName.
8. Print out the fullName.
9. Compile, debug, and run, using your name as test data.
10. Since we are adding on to the same program, each time we run the program we will get the output from the previous tasks before the output of the current task.
Answer:
import java.util.Scanner;
public class Assignment{
public static void main(String [] args)
{
Scanner input = new Scanner(System.in);
String firstName, lastName;
System.out.print("Firstname: ");
firstName = input.nextLine();
System.out.print("Lastname: ");
lastName = input.nextLine();
String fullName = firstName +" "+lastName;
System.out.print(fullName);
}
}
Explanation:
I'll use the line numbers in the question to point at the corresponding instruction
import java.util.Scanner; -- The import statement (1)
public class Assignment{
public static void main(String [] args)
{
Scanner input = new Scanner(System.in); -- Scanner object (2)
String firstName, lastName; -- Variable declarations
System.out.print("Firstname: "); ---- Prompt to enter first name (3)
firstName = input.nextLine(); --- User input for firstName (4)
System.out.print("Lastname: "); ---- Prompt to enter first name (5)
lastName = input.nextLine(); --- User input for lastName (6)
String fullName = firstName +" "+lastName; --- concatenating both user inputs (7)
System.out.print(fullName); --- Print out fullName (8)
}
}
Which statements are true regarding file management? File management means grouping related files into folders. You can store multiple folders within a file. However, a single folder can only store a single file. You can also create subfolders. Related folders when grouped together are called subfolders. When you logically organize files, folders, and subfolders, you'll get a file hierarchy resemblinga tree.
The statements that is true regarding file management are;
File management means grouping related files into folders. You can also create subfolders. Related folders when grouped together are called subfolders. What is file management what does it include?File Management is known to be one that is made up of the common operations done on files or groups of files, such as creating, opening, renaming, and others
Note that in file management, Each user are required to access to create, delete, read, write, and modify a file and also user need to have limitations to no access to others files.
Hence, The statements that is true regarding file management are;
File management means grouping related files into folders. You can also create subfolders. Related folders when grouped together are called subfolders.Learn more about file management from
https://brainly.com/question/12736385
#SPJ1
What is a clip art gallery
Which of the following is NOT one of the four benefits of using email ?
Answer:
It allows people to filter or screen messages.
Explanation:
The option that is note one of the four benefits of using email is the knowledge of using computer is required.
What is the benefit of e mail?Emails are known to be good as they help to deliver information easy and fast and as such a lot of people uses it a lot.
Concluisvely, Note that emails are often sent over the use of mobile phones or computer, and as such one do not need to have the knowledge of using computer is before they can send email.
Learn more about email from
https://brainly.com/question/24688558
#SPJ2
If you are insured with first party insurance, which of these costs will it cover?
A.
costs related to lawsuits, and penalties due to a cyberattack
B.
costs related to notifying victims of a cyberattack
DC.
costs related to copyright infringement
D.
cost related to theft of a laptop
Answer:
D.
cost related to theft of a laptop
Explanation:
correct for Plato!
Which of the following is a professional organization in the field of IT?
Society for the Prevention of Cruelty to Animals (SPCA)
American Civil Liberties Union (ACLU)
Institute of Electrical and Electronics Engineers (IEEE)
American Medical Association (AMA)
Answer:
C. Institute of Electrical and Electronics Engineers (IEEE)
Explanation:
Edge 2020
Answer:
C.
Explanation:
look up the song 2055 it ia a vibe to do work to
Where can audiovisual technology and materials be found? (Select all that apply.)
in schools
in the family home
in businesses
on the Internet
Answer:
school
family home
business
internet isnt safe
Explanation:
Answer:
Its all of the above
A: on the internet
B: in schools
C: In businesses
D: in the family home
Explanation:
EDG2021
(I found the answer in my notes, and it is all of them)
in programming and flowcharting, what components should you always remember in solving any given problem?
Answer:
you should remember taking inputs in variables
3.2 lesson practice edhesive
Answer:
3.2 Question 1
x = float(input("Enter a number: "))
if (x > 45.6):
print("Greater than 45.6")
3.2 Question 2
x = float(input("Enter your grade: "))
if (x >= 90):
print("Great! ")
Explanation:
I hope this works I do not know exactly what you were asking for
PLEASE HURRY!!!
Look at the image below!
Answer:
cde
Explanation:
You start counting from 0.
So letters are:
a b c d e f
0 1 2 3 4 5
We do include the 2, but not the 5. So answer is cde.
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text.
Ex: If the input is: (see image attached)
my code is this one but i dont know what im doing wrong:
#include
using namespace std;
int main()
{
while (true)
{
string word;
if (word.compare("Quit")==0)
{
break;
}
else if (word.compare("quit")==0)
{
break;
}
int len=word.length();
cout = 0; i--)
{
cout << word[i];
break;
}
cout << endl << endl;
}
cout << "Thank You..!";
return 0;
}
Table of Contents
1 Introduction
2 Running sed
2.1 Overview
2.2 Command-Line Options
2.3 Exit status
3 sed scripts
3.1 sed script overview
3.2 sed commands summary
3.3 The s Command
3.4 Often-Used Commands
3.5 Less Frequently-Used Commands
3.6 Commands for sed gurus
3.7 Commands Specific to GNU sed
3.8 Multiple commands syntax
3.8.1 Commands Requiring a newline
4 Addresses: selecting lines
4.1 Addresses overview
4.2 Selecting lines by numbers
4.3 selecting lines by text matching
4.4 Range Addresses
5 Regular Expressions: selecting text
5.1 Overview of regular expression in sed
5.2 Basic (BRE) and extended (ERE) regular expression
5.3 Overview of basic regular expression syntax
5.4 Overview of extended regular expression syntax
5.5 Character Classes and Bracket Expressions
5.6 regular expression extensions
5.7 Back-references and Subexpressions
5.8 Escape Sequences - specifying special characters
5.8.1 Escaping Precedence
5.9 Multibyte characters and Locale Considerations
5.9.1 Invalid multibyte characters
5.9.2 Upper/Lower case conversion
5.9.3 Multibyte regexp character classes
6 Advanced sed: cycles and buffers
6.1 How sed Works
6.2 Hold and Pattern Buffers
6.3 Multiline techniques - using D,G,H,N,P to process multiple lines
6.4 Branching and Flow Control
6.4.1 Branching and Cycles
6.4.2 Branching example: joining lines
7 Some Sample Scripts
7.1 Joining lines
7.2 Centering Lines
7.3 Increment a Number
7.4 Rename Files to Lower Case
7.5 Print bash Environment
7.6 Reverse Characters of Lines
7.7 Text search across multiple lines
7.8 Line length adjustment
7.9 Reverse Lines of Files
7.10 Numbering Lines
7.11 Numbering Non-blank Lines
7.12 Counting Characters
7.13 Counting Words
7.14 Counting Lines
7.15 Printing the First Lines
7.16 Printing the Last Lines
7.17 Make Duplicate Lines Unique
7.18 Print Duplicated Lines of Input
7.19 Remove All Duplicated Lines
7.20 Squeezing Blank Lines
8 GNU sed’s Limitations and Non-limitations
9 Other Resources for Learning About sed
10 Reporting Bugs
Appendix A GNU Free Documentation License
Concept Index
Command and Option Index
Next: Introduction, Up: (dir) [Contents][Index]
GNU sed
This file documents version 4.8 of GNU sed, a stream editor.
Copyright © 1998–2020 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.
• Introduction: Introduction
• Invoking sed: Invocation
• sed scripts: sed scripts
• sed addresses: Addresses: selecting lines
• sed regular expressions:
Explanation:
Which of the following is a post-secondary school?
A.
Community college
B.
Vocational school
C.
Four-year college
D.
All of the above
Answer:
D
Explanation:
Answer:
C.
Four-year college
Explanation:
what tools IS used to mine stones and ores
Answer:
pickaxe
Explanation:
that is the tool u use
A pickaxe or a pick.
Shown in minecraft and talked about in many story's that take place in the mines.
Depending on the pickaxe material, many things could be mines like stone and ore.
What issues will the Internet of Things present to Cybersecurity?
Answer:
The IoT offers new ways for businesses to create value, however the constant connectivity and data sharing also creates new opportunities for information to be compromised. Explore some of the more notable developments in the battle to combat cyber risks.
Explanation:
I hope this helps you. UwU. P.S. Plz mark me Brainlyest
An example of an access control is a: Multiple Choice Check digit. Password. Test facility. Read only memory.
Answer:
B. Password
Explanation:
An access control can be defined as a security technique use for determining whether an individual has the minimum requirements or credentials to access or view resources on a computer by ensuring that they are who they claim to be.
Simply stated, access control is the process of verifying the identity of an individual or electronic device. Authentication work based on the principle (framework) of matching an incoming request from a user or electronic device to a set of uniquely defined credentials.
Basically, authentication is like an access control, ensures a user is truly who he or she claims to be, as well as confirm that an electronic device is valid through the process of verification
An example of an access control is a password because it is typically a basic and fundamental front-line defense mechanism against an unauthorized use of data or cyber attacks from hackers.
What is the difference between a row and a column? Give examples
Answer:
bruh this a math question not tech
Explanation:
Answer:
a row is like stuff lined up side by side and a column could be many things but one of then is like a row of stuff but vertical
hope i help can u pls brainliest i need it :)
What is the difference in between data science and data analytics?
Answer:
Data analytics focuses more on viewing the historical data in context while data sciene focuses more on machine.
Explanation:
Data analytics is more specific and concentrated than data science.
#include
using namespace std;
const int SIZE = 4;
bool isSorted(const int arr[], int size);
bool isNonDecreasing(const int arr[], int size);
bool isNonIncreasing(const int arr[], int size);
void printArr(const int arr[], int size);
int main()
{
int test1[] = { 4, 7, 10, 69 };
int test2[] = { 10, 9, 7, 3 };
int test3[] = { 19, 12, 23, 7 };
int test4[] = { 5, 5, 5, 5 };
if (!isSorted(test1, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr(test1, SIZE);
if (!isSorted(test2, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr(test2, SIZE);
if (!isSorted(test3, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr(test3, SIZE);
if (!isSorted(test4, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr(test4, SIZE);
return 0;
}
bool isSorted(const int arr[], int size)
{
// TODO: This function returns true if the array is sorted. It could be
// sorted in either non-increasing (descending) or non-decreasing (ascending)
// order. If the array is not sorted, this function returns false.
// HINT: Notice that the functions isNonDecreasing and isNonIncreasing are not
// called from main. Call the isNonDecreasing and isNonIncreasing functions here.
}
bool isNonDecreasing(const int arr[], int size)
{
// TODO: Loop through the array to check whether it is sorted in
// non-decreasing (in other words, ascending) order. If the array
// is non-decreasing, return true. Otherwise, return false.
}
bool isNonIncreasing(const int arr[], int size)
{
// TODO: Loop through the array to check whether it is sorted in
// non-increasing (in other words, descending) order. If the array
// is non-increasing, return true. Otherwise, return false.
}
void printArr(const int arr[], int size)
{
for (int i = 0; i < size; i++)
cout << arr[i] << " ";
cout << endl << endl;
}
Output
SORTED
4 7 10 69
SORTED
10 9 7 3
NOT SORTED
19 12 23 7
SORTED
5 5 5 5
Code
//The added part is in the bottom
#include <iostream>
using namespace std;
const int SIZE = 4;
bool isSorted (const int arr[], int size);
bool isNonDecreasing (const int arr[], int size);
bool isNonIncreasing (const int arr[], int size);
void printArr (const int arr[], int size);
int
main ()
{
int test1[] = { 4, 7, 10, 69 };
int test2[] = { 10, 9, 7, 3 };
int test3[] = { 19, 12, 23, 7 };
int test4[] = { 5, 5, 5, 5 };
if (!isSorted (test1, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr (test1, SIZE);
if (!isSorted (test2, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr (test2, SIZE);
if (!isSorted (test3, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr (test3, SIZE);
if (!isSorted (test4, SIZE))
cout << "NOT ";
cout << "SORTED" << endl;
printArr (test4, SIZE);
return 0;
}
bool
isSorted (const int arr[], int size)
{
//Added part
if (isNonDecreasing (arr, size) || isNonIncreasing (arr, size))
{
return true;
}
else
{
return false;
}
}
bool
isNonDecreasing (const int arr[], int size)
{
for (int i = 0; i < (size - 1); i++)
{
if (arr[i] > arr[i + 1]) //It compares the n value with the n-1 value and output
{
return false;
break;
}
}
return true;
}
bool
isNonIncreasing (const int arr[], int size)
{
for (int i = 0; i < (size - 1); i++)
{
if (arr[i] < arr[i + 1]) //It compares the n value with the n-1 value and output reautilization of previous function by replacing only “<”
{
return false;
break;
}
}
return true;
}
void
printArr (const int arr[], int size)
{
for (int i = 0; i < size; i++)
cout << arr[i] << " ";
cout << endl << endl;
}
Behaving in an acceptable manner within a workplace environment is referred to as having
restraint
workplace etiquette
patience
experience
Answer:
Workplace Etiquette
Explanation:
Hope dis helps
Answer:
B) workplace etiquette
Explanation:
When drivers have no control over their driving environment and are stuck in traffic, the lack of control over the traffic event is frustrating and frustration leads to ___________ .
aggression
courtesy
restriction
regulation
How do I turn on autosave in Pokemon Shield?
Answer:
You Can't
Explanation:There isn't a feature for that in the game.
Answer:
You can't. It really sucks. Just save your game every hour when you play.