Answer:
The function in Python is as follows:
def comparatorValue(a,b, d):
count = 0; test = 0;
for i in a:
for j in b:
if abs (i - j) <= d:
test+=1
if test == 0:
count+=1
test = 0
print(count)
Explanation:
This defines the function
def comparatorValue(a,b, d):
The initializes the count and test to 0
count = 0; test = 0;
This iterates through a
for i in a:
This iterates through b
for j in b:
This calculates absolute difference of elements in a and b. The absolute is then compared to d.
If the calculated difference is less or equal to d, the value is not a comparator value (test in then incremented)
if abs (i - j) <= d:
test+=1
The comparison ends here
If test is 0, then the value is a comparator value (count is incremented by 1)
if test == 0:
count+=1
Test is set to 0 for another iteration
test = 0
This prints count
print(count)
how to make an app according to peoples will
Answer:
Follow these steps to create your own app:
1)Choose your app name.
2)Select a color scheme.
3)Customize your app design.
4)Choose the right test device.
5)Install the app on your device.
6)Add the features you want (Key Section)
7)Test, test, and test before the launch.
8)Publish your app.
Explanation:
(!!_!!)
Assign sum_extra with the total extra credit received given list test_grades. Iterate through the list with for grade in test_grades:. The code uses the Python split() method to split a string at each space into a list of string values and the map() function to convert each string value to an integer. Full credit is 100, so anything over 100 is extra credit.Sample output for the given program with input: '101 83 107 90'Sum extra: 8(because 1 + 0 + 7 + 0 is 8)user_input = input()test_grades = list(map(int, user_input.split())) # test_grades is an integer list of test scoressum_extra = 0 # Initialize 0 before your loop''' Your solution goes here '''print('Sum extra:', sum_extra)
Answer:
Replace ''' Your solution goes here '''
With
for i in test_grades:
if i > 100:
sum_extra+=i - 100
Explanation:
This iterates through the list
for i in test_grades:
This checks for list elements greater than 100
if i > 100:
The extra digits (above 100) are then added together
sum_extra+=i - 100
Although it is not a term Excel uses, how do most people think of Excel?
Answer:
People think of Excel as a Spreadsheet.
Consider three strings instr1, instr2 and instr3 having only lowercase alphabets. Identity a string outstr, with the smallest possible length such that when strings instr1, outstr and instr2 are concatenated in the same order instr3 becomes a substring of the concatenated string. Print the smallest possible length of (instr1 + outstr - instr2) satisfying the given criteria. Note: The string outstr can also be an empty string Input Format: The first second and third line contain strings instr1instr2 and instr3 respectively. Read the input from the standard input stream. Output Format: Print the smallest possible length of (instr1 + outstr + instr2) satisfying the given criteria. Print the output to the standard output stream You're Explanati CIAR Sample Output Jusuen that when strings instr 1. outstr and instr2 are concatenated in the same order instr3 becomes a substring of the concatenated string. Print the smallest possible length of (instr. outstr - instr2) satisfying the given criteria
The relation LIBRARY records books currently on loan to students. Each book has one ISBN_NO The library has several copies of each book. A student may borrow more than one book but may not borrow a book they have already checked out. Assume also that no two library members have the same name.
ISBN_NO STUDENT_NAME STUDENT_ADDRESS
01 Liu Phelps
02 Liu Phelps
02 Holmes Phelps
03 Lopez Hollister
LIBRARY
a) Is LIBRARY in 1NF?
b) Identify candidate key(s)
c) Identify functional dependencies
d) Explain why is LIBRARY not in 2NF?
e) Decompose LIBRARY to comply with 2NF rules.
Write a program that accepts inputs, outputs them and exits correctly when - 1
is pressed
Answer:
Explanation:
The following program is written in Python. It simply creates an endless loop that continously asks the user for an input. If the input is not -1 then it outputs the same input, otherwise it exists the program correctly. A test output can be seen in the attached image below.
while True:
answer = input("Enter a value: ")
if answer != "-1":
print(answer)
else:
break
Write an algorithm that accepts two numbers,
divide the first number by the second and display the
quotient
Which effect is used in this image?
A.sepia effect
B.selective focus
C.zoom effect
D.soft focus
Answer:
A.sepia effect.
When a sentinel is used in a (______/posttest) loop to validate data, the loop repeats as long as the input is (valid/______). pretest, invalidPress enter after select an option to check the answer posttest, invalidPress enter after select an option to check the answer pretest, validPress enter after select an option to check the answer posttest, valid
Answer:
When a sentinel is used in a (pretest/post test) loop to validate data, the loop repeats as long as the input is (valid/invalid).
Explanation:
Required
Fill in the gaps
Sentinel are used to validate or invalidate loops (pretest and post test loops).
Since , some parts of the brackets have aready been filled, we simply complete the blanks with the opposite of the term in the bracket. i.e. the opposite of post test is pretest and the opposite of valid is invalid.
So, the blanks will be filled with pretest and invalid.
in online education is intrinsically related to equity. Professionalism Communication Accessibility
a. professionalism
b. communication
c. Accessibility
Answer:
The correct answer is C. Accessibility.
Explanation:
Online education is understood as the educational system by which knowledge is acquired through the use of computer media in which students interact with teachers electronically without personally attending classes in person. This type of education has advantages and disadvantages: in terms of the pros, it is an education system that requires less time and mobility on the part of the student, thus facilitating the process of learning and making the times more effective, but in terms of its cons, online education is not always accessible, as in order to access it requires a certain connectivity capacity, that is, the provision of a computer and an internet network capable of guaranteeing the functioning of online educational systems.
In this context, accessibility is understood as the ability of each individual to acquire an online education through the use of the necessary means for this, so accessibility implies the possibility of accessing said electronic media. This is related to equity, as online education systems should be able to guarantee their use by means of equipment that is as less specific as possible so that any common person can access them.
Answer:
C. Accessibility
Explanation:
Intrinsic motivation is doing something for the sake of personal satisfaction.
For the following machine code expressed in hexadecimal, write the corresponding MIPS assembly instruction. Note: in case of branch or jump instructions, you should write the target address in hexadecimal notation in the MIPS assembly instruction. e.g., j 0x00000016.
Machine code:0x08100008
Assembly instruction:??
Answer:
Assembly instruction is j 0x00400020
Explanation:
j 0x00400020
EXPLAINATION-
GIVEN Machine Code = 0x 0 8 1 0 0 0 0 8
Step 1:
Now convert 0 8 1 0 0 0 0 8 Each digit to Binary
= 0000 1000 0001 0000 0000 0000 0000 1000
= 000010 00000100000000000000001000
000010 is opcode of j instruction
we are left with
0000 0100000000000000001000
Step 2:
Add two zeroes to right
0000 0100 0000 0000 0000 0010 0000
Step 3:
Remove 4 highest bit
0100 0000 0000 0000 0010 0000
Decimal of it is 4194336
Step 4:
Now convert it into Hexadecimal
we get 400020
So Assembly instruction is j 0x00400020
j 0x00400020
.......................................................................................................................................................................
a qbasic program to tranverse a binary tree
Explanation:
i don't know. ....
...;!
Devices which are used to receive data from central processing unit are classified as
Answer:
Input devices are used to receive data from central Processing Unit.
Explanation:
The keyboard shortcut to open the Help window is:
O F1
O F2
O F4
O F8
Answer:
F1 is the correct answer
You are the IT administrator for a small corporate network. The employee in Office 1 needs your assistance managing files and folders. Your task is to use the command prompt to complete the following:
a. Create the D:\utilities\recover directory. Use the md or mkdir command to create (make) a directory.
b. Delete the D:\software\arch98 directory and all of its files.
c. Use the rd command to delete (remove) a directory.
d. Use the /s switch to remove the directory and all of its contents at once.
(a) mkdir /d D:\utilities\recover
or
mkdir D:\utilities\recover
(b) rd /s D:\software\arch98
Explanation:(a) To make a new directory we use the md or mkdir command followed by the name of the directory as follows;
mkdir [name_of_directory]
The name of the directory could also be a relative or absolute path depending on the request.
In the task, the specified directory uses an absolute path given as D:\utilities\recover. This path is in a drive D. Therefore, if you are in another drive different than D, to run this command, it is a great idea to do that with the /d switch.
In summary:
i. if in drive D, to make a directory D:\utilities\recover, type the following command;
mkdir D:\utilities\recover
ii. if otherwise in a different drive, type the following command.
mkdir /d D:\utilities\recover
(b) To delete a directory, we use the rd or rmdir command. If the directory has contents that also need to be deleted, we use the switch /s alongside the rd or rmdir.
In the task given, the directory to be deleted is D:\software\arch98. This includes deleting all of its files too. To do this, type the following command;
rd /s D:\software\arch98
A calculator is not a computer because
[tex]\huge\fbox\red{❥answer}[/tex]
By definition a computer is an electronic device used to store and compute data. So, by definition a calculator stores and interprets data/numbers, and that makes it a computer. However, a computer can also use programs, and manipulate stored data to complete those programs.
hope it helps!! :D
What is computer code?
A. Java Script
B. XML
C. HTML
D. Any programming language
Answer:
D
Explanation:
A new attack involves hacking into medical records and then offering these records for sale on the black market. A medical records company in Brazil learned of this attack and has built controls into its systems to prevent hackers from accessing its systems. This is an IT application of the COSO principle of _______ and evidences _______ controls.
Answer:
1. Control Activities
2. Internal
Explanation:
Considering the scenario explained in the question, it can be concluded that This is an IT application of the COSO principle of CONTROL ACTIVITIES and evidence PREVENTIVE controls.
In this case, the Control Activities which is one of the five principles of COSO (Committee of Sponsoring Organizations of the Treadway Commission) is a means of selecting and developing general control over technology, through strategies and techniques. This is what the medical records company did by building controls into its systems to prevent hackers from accessing its system.
This is an example of internal CONTROL ACTIVITIES that illustrates PREVENTIVE control against potential risks or hacks.
The use of Quick Styles is a great way to save
a. money
b. grades
C. time
d. files
Please select the best answer from the choices provided
Ο Α
B
Answer:
c
Explanation:
trust
a heart murmur is caused by incorrect operation of ________?
Answer:
the valves
Explanation:
science explains your questions answer. also did you know that the queen was an engineer in WWII? you probably did but you need 20 characters to submit an answere trust me it is the valves.
One of the algorithms we covered this week is considered impractical for real-world use and is almost exclusively used only in the academic setting. This algorithm is
Answer:
Bubble sort
Explanation:
Bubble Sort is generally considered impractical for real-world use and is almost exclusively used only in the academic setting.
Bubble sort is often characterized by its iteration method, whereby it steps through a list repeatedly by performing the comparison and swapping near elements if the second element when is wrongfully positioned.
It is considered as a form of simple algorithm and sometimes referred to as sinking sort.
In reality, algorithm including the likes of quicksort, import, or merge sort is deemed efficient.
LAB: Divide input integers
Write a program using integers userNum and divNum as input, and output userNum divided by divNum three times. Note: End with a newline.
Ex: If the input is:
2000 2
the output is:
1000 500 250
Note: In Java, integer division discards fractions. Ex: 6 / 4 is 1 (the 0.5 is discarded).
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
/* Type your code here. */
}
}
(My professor wants us to use this temple and I'm not sure how I should start typing the code were it says "type code here". I've tried differnt forms like the one provided below but they all have errors according to the program. it tells me that i have to place ; .
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
userNum= int(input())
divNum= int(input())
# calculating the division three times
userNum=userNum//divNum
#i have used end=' ' so that it does not produce new line
# instead of that it produce space
print(userNum,end=' ')
userNum=userNum//divNum
print(userNum,end=' ')
userNum=userNum//divNum
print(userNum,end=' ')
}
}
Errors:
Program errors displayed here
LabProgram.java:5: error: '.class' expected userNum= int(input()) ^ LabProgram.java:5: error: ';' expected userNum= int(input()) ^ LabProgram.java:6: error: '.class' expected divNum= int(input()) ^ LabProgram.java:6: error: ';' expected divNum= int(input()) ^ LabProgram.java:7: error: illegal character: '#' # calculating the division three times ^ LabProgram.java:7: error: ';' expected # calculating the division three times ^ LabProgram.java:7: error: ';' expected # calculating the division three times ^ LabProgram.java:9: error: illegal character: '#' #i have used end=' ' so that it does not produce new line ^ LabProgram.java:9: error: ';' expected #i have used end=' ' so that it does not produce new line ^ LabProgram.java:9: error: ';' expected #i have used end=' ' so that it does not produce new line ^ LabProgram.java:9: error: ';' expected #i have used end=' ' so that it does not produce new line ^ LabProgram.java:9: error: ';' expected #i have used end=' ' so that it does not produce new line ^ LabProgram.java:9: error: ';' expected #i have used end=' ' so that it does not produce new line ^ LabProgram.java:10: error: illegal character: '#' # instead of that it produce space ^ LabProgram.java:10: error: ';' expected # instead of that it produce space ^ LabProgram.java:10: error: ';' expected # instead of that it produce space ^ LabProgram.java:10: error: ';' expected # instead of that it produce space ^ LabProgram.java:11: error: ';' expected print(userNum,end=' ') ^ LabProgram.java:12: error: ';' expected userNum=userNum//divNum ^ LabProgram.java:13: error: ';' expected print(userNum,end=' ') ^ LabProgram.java:14: error: ';' expected userNum=userNum//divNum ^ LabProgram.java:15: error: ';' expected print(userNum,end=' ') ^ 22 errors
In the given code you include two languages, that's why it will give the error messages, and for better understanding, we give the program into two languages:
Following are the Java and Python Program to these questions:
Java Program:
import java.util.*;//import package
public class LabProgram //defining a class LabProgram
{
public static void main(String[] ar)//defining main method
{
int userNum,divNum;//defining integer variable
Scanner on=new Scanner(System.in);//defining Scanner class Object for user-input
userNum=on.nextInt();//input value
divNum=on.nextInt();//input value
for(int i=0;i<3;i++)//defining loop to divide value 3 times
{
userNum=userNum/divNum;//dividing userNum by divNum and store its value into userNum
System.out.println(userNum);//print userNum value
}
}
}
Python Program:
userNum= int(input())#input integer value
divNum= int(input())#input integer value
# calculating the division three times
userNum=userNum//divNum#using userNum that divides userNum by divNum and store its value
print(userNum)#print userNum value
userNum=userNum//divNum#using userNum that divides userNum by divNum and store its value
print(userNum)#print userNum value
userNum=userNum//divNum#using userNum that divides userNum by divNum and store its value
print(userNum)#print userNum value
Output:
Please find the attached file.
Learn more:
brainly.com/question/21661364
A person's oral communication skills can give either a positive or negative first impression.
Answer:
true
Explanation:
oral communication can be awkward or good.
Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (currentPrice * 0.051) / 12 (Note: Output directly. Do not store in a variable.). Ex: If the input is: 200000 210000 the output is:
This house is $200000.
The change is $-10000 since last month.
The estimated monthly mortgage is $850.0.
Answer:
The program in Python is as follows:
currentPrice = int(input("Current: "))
lastMonth = int(input("Last Month: "))
print("The house is $",currentPrice)
print("The change is $",(currentPrice-lastMonth),"since last month")
print("The estimated monthly mortgage is $",(currentPrice * 0.051) / 12)
Explanation:
Get input for current price
currentPrice = int(input("Current: "))
Get input for last month price
lastMonth = int(input("Last Month: "))
Print current price
print("The house is $",currentPrice)
Print change since last month
print("The change is $",(currentPrice-lastMonth),"since last month")
Print mortgage
print("The estimated monthly mortgage is $",(currentPrice * 0.051) / 12)
Which of the examples is part of client-side code?
A.
update bank account balance
B.
prompt for special characters in user name
C.
navigate to a different website
D.
delete an online social networking account
E.
shop for books online
Answer:
I think it is A(update bank account balance)
not really sure
Answer:
B.
Explanation:
javascript or python's input code is a client sided code
In a void function, the return statement is not necessarily. True or false?
Answer:
true
Explanation:
Answer:
True
Explanation:
In a void function, who the name says, void = empty, you dont need to return any result.
A company hires some temporary workers. On day one, the temporary employees report they are unable to connect to the network. A network technician uses a packet analysis tool and finds that many clients are continuously sending out requests for an IP address, but many of them are not receiving a response. Which of the following could be the cause of this issue?
A. Exhausted DHCP scope.
B. Untrusted SSL certificates.
C. Duplicate MAC addresses.
D. Incorrect firewall settings.
Answer:
A. Exhausted DHCP scope.
Explanation:
The company has many temporary workers, and permanent workers. There are many people under one network. Since, there are many workers, there can't be untrusted SSL certificates. They all have different devices or computers, so they can't both have duplicate MAC addresses. Lastly, the firewall is supposed to protect against computer viruses and other types of malware, not to harm the user and scope. So, the answer is A.
DR JAVA
Write a program that includes the following while loops.
Input radius (double) values and prints the diameter, circumference, and area of a circle. The loop will stop executing when a 0 or negative value is entered. Declare a global constant for PI, where PI = 3.14159265. Be sure and echo the input and display all output to 3 decimal places.
a second while loop that works as above, but instead asks the user if they want to enter radius (Y/N). What happens if you enter a negative radius?
Input temperatures until 999 and print whether above or below freezing.
Input temperatures until 999 and count number above and below freezing.
Input temperatures until 999 and print the average temperature.
Ask user if they want to enter a temperature and print whether above or below freezing.
a while loop that repeatedly enters test scores (integer) (pick a sentinel) and counts the numbers of As, Bs, Cs, Ds, and Fs and also prints the average test score.
Answer:
Explanation:
The following code is all written in Java. It is a very long program that contains methods for all of the requested while loops in the question. Each one is called inside the main method itself. A part of the output is shown in the attached picture below due to the output being so long. Due to technical difficulties, I have attached the code as a txt file below.
Select which is true for for loop
Answer:
i dont understand what you mean and what you are asking in the qestion
Explanation:
explain why you can determine machine epsilon on a computer using IEEE double precision and the IEEE Rounding to Nearest Rule by calculating (7/3 - 4/3) - 1
Answer:
I think this is the answer
Explanation:
so if it is not right use it as an exsample