Answer:
Position feature
Wrap text feature
Picture tools
Explanation:
Answer:
A.) Position Feature
B.)Wrap text feature
E.)Picture tools
Explanation:
The template code provided is intended to take two inputs, x and y, from the user and print "pass" if one or more of the following is true:
x is not less than 4
y is not greater than 5 and x + y is less than 7
However, when using De Morgan's law to simplify this code, the programmer has made some mistakes. Can you correct the errors so the code functions as intended?
/* Lesson 6 Coding Activity Question 2 */
import java.util.Scanner;
public class U3_L6_Activity_Two{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
int y = scan.nextInt();
if(!((x 5) || x+y > 7))
System.out.println("pass");
}
}
import java.util.Scanner;
public class U3_L6_Activity_Two{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
int y = scan.nextInt();
if(x>=4|| ((y < 5) && ((x+y) < 7))){
System.out.println("pass");
}
}
}
I'm pretty sure this is what you're looking for. Best of luck.
For formatting and readability sake, the given code is re-written as follows:
/* Lesson 6 Coding Activity Question 2 */
import java.util.Scanner; // 1
public class U3_L6_Activity_Two{ // 2
public static void main(String[] args){ // 3
Scanner scan = new Scanner(System.in); // 4
int x = scan.nextInt(); // 5
int y = scan.nextInt(); // 6
if(!((x 5) || x+y > 7)) // 7
System.out.println("pass"); // 8
}
}
The line that needs to be fixed is the if statement in line 7.
As given in the instruction, the code prints "pass" if one or more of the following is true:
i. x is not less than 4. This can be re-written as;
! ( x < 4 )
ii. y is not greater than 5 and x + y is less than 7. This can be re-written as;
! (y > 5) && (x + y < 7)
To have the right operand of ii to have a negation, we can re-write as follows;
! (y > 5) && ! (x + y > 7) (i.e changing the less than sign to greater than and then putting the negation sign (!)). This is great so that the De Morgan's law will be applicable on both sides.
Note:
a. ! is the Java's equivalent way of writing the logical operator NOT
b. && is the Java's equivalent way of writing the logical operator AND
Since one or more of the conditions in (i) and (ii) need to be true before the "pass" is printed, we can combine (i) and (ii) using the OR operator ( || ) as follows;
! ( x < 4 ) || ( ! (y > 5) && ! (x + y > 7) ) ----------------(***)
The De Morgan's laws are very great for making deductions, equivalence and valid proofs when using logical operators.
The laws are as follows;
i. ∼ (P ∧ Q) = ∼ P ∨ ∼ Q
This can be written as;
! (P AND Q) = ! P OR !Q
or in Java like syntax as
! (P && Q) = ! P || !Q
ii. ∼ (P ∨ Q) = ∼ P ∧ ∼ Q
This can be written as;
! (P OR Q) = ! P AND !Q
or in Java like syntax as
! (P || Q) = ! P && !Q
Using these laws, we can simplify our expression in (***) as follows;
! ( x < 4 ) || ( ! (y > 5) && ! (x + y > 7) )
a. Start with the right side i.e ( ! (y > 5) && ! (x + y > 7) )
The De Morgan's law (stated in (ii) above) will remove the negation from both terms in the right side term, change the && to || and then put a single negation to apply to both terms in the bracket to give the following;
! ( x < 4 ) || ! ( y > 5 || x + y > 7 )
b. Now, there are two main terms - ! ( x < 4 ) and ! ( y > 5 || x + y > 7 ) separated by ||
Apply the De Morgan's law (stated in (i) above) to remove the negation from both terms, then change the || to && and then put a single negation to apply to both terms.
! ( x < 4 && (y > 5 || x + y > 7))
The result in b is the simplified version of the condition in the if statement.
The complete and corrected code is therefore written as follows;
/* Lesson 6 Coding Activity Question 2 */
import java.util.Scanner; // 1
public class U3_L6_Activity_Two{ // 2
public static void main(String[] args){ // 3
Scanner scan = new Scanner(System.in); // 4
int x = scan.nextInt(); // 5
int y = scan.nextInt(); // 6
if(! ( x < 4 && (y > 5 || x + y > 7) ) ) // 7
System.out.println("pass"); // 8
}
}
Read more about De Morgan's law at: https://brainly.com/question/13317840
Which kind of a person will you be if you prove to be accountable for your actions?
Answer: You would be a person of integrity.
Explanation: Look up Integrity for details.
Select the correct answer.
What does a script supervisor do?
O A. supervises the final edits of the script
OB.
helps the video editor to segregate useful clips from the junk
Ос.
revises the initial script before the process of logging
D. keeps a close watch on the monitor
E.
carries out assembly editing for a production house
Answer:
B
Explanation:
Name the type of software which provides the user interface. [1 mark
Explanation:
user interface, also sometimes called a human-computer interface, comprises both hardware and software components. It handles the interaction between the user and the system.
There are different ways of interacting with computer systems which have evolved over the years. There are five main types of user interface:
command line (cli)
graphical user interface (GUI)
menu driven (mdi)
form based (fbi)
natural language (nli)
CAN SOMEONE HELP PLEASE GIVING OUT BRAINLIEST
It is usually simple to delete old posts and online conversations if they make you look bad.
True
False
Answer:
not usually..sorry :(
Explanation:
Pls Hurry!!
What is the missing line of code?
>>> sentence = "Programming is fun!"
>>> _____
'gra'
sentence[2:5]
sentence[3:5]
sentence[3:6]
sentence[2:6]
Answer:
The answer is [3:6]
Explanation:
At first i thought it would be sentence[3:5], but when i put my theory to the test, it was actually sentence[3:6].
hope i helped
Answer:
the answer is [3:6]
Explanation:
Code Hs karal 3.4.2 lots of hurdles?? I cannot figure this one out at all
Answer:
codeHS 3.4.2: Lots of Hurdles answer
Explanation:
50 PTS
in Java
Write a program with a method called passwordCheck to return if the string is a valid password. The method should have the signature shown in the starter code.
The password must be at least 8 characters long and may only consist of letters and digits. To pass the autograder, you will need to print the boolean return value from the passwordCheck method.
Hint: Consider creating a String that contains all the letters in the alphabet and a String that contains all digits. If the password has a character that isn’t in one of those Strings, then it’s an illegitimate password!
import java.util.Scanner;
public class JavaApplication46 {
public static boolean passwordCheck(String pass){
String alphanum = "abcdefghijklmnopqrstuvwxyz1234567890";
boolean legit = true;
if (pass.length()>= 8){
for(int i = 0; i < pass.length(); i++){
if (alphanum.indexOf(pass.charAt(i)) != -1 && legit != false){
legit = true;
}
else{
legit = false;
}
}
}
else{
legit = false;
}
return legit;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.print("Enter a password: ");
String password = scan.next();
System.out.println(passwordCheck(password));
}
}
I hope this helps!
A spreadsheet software program requires that users predefine each field’s data type. The software program is most likely programmed using a language that is
open.
predefined.
strongly typed.
weakly typed.
Answer:
Pretty sure its weakly typed
Answer:
strongly typed
Explanation:
Anisha was learning ‘for’ and ‘while’ loop. Help her understand why for and while loops are called entry controlled loops.
Entry controlled loop - The loop which has a condition check at the entrance of the loop, the loop executes only and only if the condition is satisfied is called as entry control loop.
So, for and while loops are its examples.
Plagiarism occurs when writers
use others’ ideas and writing as their own.
exclude a bibliography from their work.
include direct quotations from others.
use others’ work as inspiration.
Answer:
A- Use others' ideas and writing as their ownExplaniation:
it's plagiarism, just don't take other people's work and pass it as your own. smh lol
Answer:
Just so I don't get reported for copying I will tell all the answers that are not right.
Explanation:
B.
C.
D.
Hope this helps.
TASK 1 – Work out the cost.
The cost of the trip for each student is a share of the cost of a coach plus the cost of entry to the theme park.
The total cost of the coach will be $550. The entry cost to the park is $30 for each student. The national park gives one free ticket for every ten that are bought, which must be taken into consideration.
Set up a program that:
• stores the cost of the coach
• stores the cost of an entry ticket
• inputs the estimated number of students taking part, this must be validated on entry and an
unsuitable entry rejected
• calculates and outputs the recommended cost per student to ensure the trip does not make a loss.
Write an algorithm to complete Task 1, using either pseudocode, programming statements or a
flowchart. [5]
Answer:
please check the question again
Explanation:
Umm, my computer is being rlly wierd and not letting me give brainliest to someone, anybody know what to do???
Answer:
just restart it and when the computer is done restarting then repeat the process once more. This is what i did and it made a huge difference.
Explanation:
This resets the main hard drive and the reboots the system entirely. It helps clear out bugs and fixes any and all small issues.
PLS HURRY!!
Look at the image below
Answer:
1. A function can use variables as parameters.
2. A function can have more than one parameter.
3. The definition of a function must come before where the function is used.
Explanation:
The definition of a function can come before or after it is used - I am pretty sure it cannot be placed after the function is being used. It should always come before it is used, so this statement is false.
A function can use variables as parameters - this is true, variables are just labels to hold data.
A function can have more than one parameter - this is true.
A function must have a return value - functions do not always have to return values. It could simply print, so this statement is false.
The definition of a function must come before where the function is used - As said earlier, the definition of functions must come before it is used/called. This statement is true.
Hope this helps :)
Which component in a CPU is responsible for transferring
data from one functional component to another?
a.
Define a computer with its proper meaning.
Answer:
Computer
Explanation:
a programmable electronic device designed to accept data, perform prescribed mathematical and logical operations at high speed, and display the results of these operations.
Answer:
computer
Explanation:
An electronic machine that processes, stores data, and does calculations.
Identify an advantage of writing HTML code manually.
You do not have to learn HTML.
You can figure out how the markup affects the function of the site.
You can see rendered HTML as you go.
Answer:
1. You retain 100% control over your site and where it is hosted
2. Free WYSIWYG sites aren’t really free
3. You make yourself seem irrelevant to clients
4. You understand your own code
5. Your own code is nearly always more efficient
6. Your own code is more secure
7. It’s easier to iterate your own code
8. Your own code is original
9. Writing your own code helps you grow as a developer
Explanation:
You can choose the points you want. let me know if you need any further information.☺️
Please rate if you happy
Brailliest if you want
Answer:
B. You can figure out how the markup affects the function of the site.
Explanation:
its the correct answer :)
Need answer Asap!!!! Which file type is the best choice if the image will be made into a billboard?
Answer:
A .psd file
Explanation:
Adobe photoshop files are always going to be same and there is no compression. Even better .ai files are saved into equations so you can't alter or dumb it down.
Which best describes why plagiarism can have legal consequences, such as lawsuits and fines?
It upsets the authors of original works.
It can harm the original author’s reputation.
It is considered a form of stealing.
It can lead to the original author being arrested.
Answer:
C. It is considered a form of stealing.
Explanation:
Sorry, I'm a little late but still hope this helps:)
Answer:
The answer is C
Explanation:
what is the appeal of listening to music
happiness certain songs bring joy to certain people
Help me pls!!! last question
Tori needs to turn her Turtle to the left 90 pixels. Which line of code should Tori use?
tina(90)
tina.back(90)
tina.left(90)
tina.right(90)
Answer:
tina.left(90)
Explanation:
In code if you want your character to turn left you put "left" in your code and if you want your character to go right type "right" and so on and so on so your answer is tina.left(90)
Answer: Option C is the correct line of code Tori should use.
tina.left(90)
Explanation:
I took the test and got it correct, you can trust me.
, Hope this helps :)
Have a great day!!
Why might be one reason a stock becomes more valuable over time?
A. The industry is growing
B. The company is well managed
C. There’s a lot of demand on the product
D. All of the above
Why are many otherwise safety-conscious people victims of Internet crime?
A. They are naïve and gullible.
B. Hackers are smarter than criminals in the non-digital world.
C. Effective security measures are very complex.
D. They have not been educated in safe digital best practices.
Answer:
D
Explanation:
:)
The people who get or become the victims of internet crime are those who don't have been educated about safety in digital space.
Internet crime is cyber fraud. The crime involves the computer and the network, as it may be targeted for the victim. One needs to have complete knowledge of cyber security and safety procedures.Hence the option D is correct.
Learn more about the people victims of Internet crime
brainly.com/question/5633960.
Write a python program to find factorial, use exception handling and display an appropriate message if the user inputs alphabets instead of the number. Emulate Index error for a list and handle that exception. Find factorial for all numbers in a given list and display the result.
def func(lst):
fac_lst = ([])
try:
for x in lst:
i = 0
fac = 1
while i < x:
fac *= (x - i)
i += 1
fac_lst.append(fac)
return fac_lst
except TypeError:
return "Please input only numbers!"
except IndexError:
return "Please stay within the index!"
lst = ([1, 2, 3, 4, 5, 6, 7, 8])
print(func(lst))
I think this is what you're looking for. Best of luck.
1) I hurt my leg yesterday, and I had to go to the doctor. 2) I asked my mother to write an excuse for me to get back in school. 3) She wrote that I had twisted my ankle doing exxercise. 4) She also wrote that I had been prescribed some medicine that could make me sleepy. 5) Finally, she wrote that she wanted to exttend her apologies for my absence. 7. Which of the first four sentences contains an error in spelling? Sentence 1 Sentence 2 Sentence 3 Sentence 4
Answer: Sentence 3
Explanation:
Because exxercise is spelled wrong its spelled exercise.
Answer:
the correct answer would be 3 AND 5
3)She wrote that I had twisted my ankle doing exxercise.
it is spelled wrong, it needs to be exercise
5)Finally, she wrote that she wanted to exttend her apologies for my absence.
it is spelled word, it needs to be extend
hope this helped
Describe how each command is used by matching the command to its purpose.
removes data fror
places it on the cli
Paste
cancels a previou
Undo
restores a previou
Copy
duplicates data a
clipboard
Cut
Redo
places data in its
Answer:
The correct answer to this question is given below in the explanation section.
Explanation:
The correct command matches its use are given below:
Paste Places data in its
Undo Cancel a previous
Copy Duplicates data on the clipboard
Cut Removes data for places it on the clipboard
Redo restores a previous
Paste term is used when you are placing copied data. Undo is used to cancel a previous action performed while Redo is used to restores a previously performed action. The copy is used to duplicate data on the clipboard while Cut is used to removes data for places/ to paste somewhere else.
Kellyn needs to move Slide 8 of his presentation up so that it becomes Slide 6. What best describes how he can do this using the slide thumbnails to the left of the main view?
A. He can right-click on Slide 6, then choose “Insert Before” and select Slide 8 from the options given.
B. He can right-click on Slide 8 and hold the mouse button while dragging up until the insertion point is after Slide 6.
C. He can left-click on Slide 8 and hold the mouse button while dragging up until the insertion point is after Slide 5.
D. He can left-click on Slide 6, then choose “Move To” and select Slide 8 from the options given.
Answer:
C
Explanation:
Most programs for slides allow the individual to click and drag a slide where it belongs.
In a science study group, Leonardo explains how atoms make up molecules. Talia repeats what Leonardo says in her own words. How is Talia practicing active listening? She is reflecting on what has been said. She is politely disagreeing with Leonardo. She is asking Leonardo a lot of questions. She is focused on only important information.
Answer:
A she is reflecting on what leonardo said but in her own words
Explanation:
Answer:
A: She is reflecting on what has been said.
Explanation:
Edge 2020
WRITE IN YOUR OWN WORDS:
What is a possible sign that your computer has been hijacked by Botware?
Answer:
One major sign of a computer being hijacked is the use of system resource by unknown programs. For example, full memory, high cpu usage, slow start up, crashes and errors, and low avalible storage space.
Explanation: