The function to test for divisibilty by 3 will accept an input integers and divide it by three to check if its divisible by 3.
The function to test for divisiblity by 3 is as follows:
integer = input("input the integer to check if it's divisible by 3: ")
def reduce(integer):
list1 = []
sum1 = 0
for i in str(integer):
list1 += i
results = list(map(int, list1))
for x in results:
sum1 += x
if sum1 < 20 and sum1%3==0:
return "The integer is divisible by 3"
elif sum1 < 20 and sum1%3 != 0:
return "The integer is not divisible by 3"
else:
while sum1 >= 20:
z = sum(list(map(int, list(str(sum1)))))
if z%3==0:
return "The integer is divisible by 3"
else:
return "The integer is not divisible by 3"
print(reduce(integer))
Code explanationThe integer variable stores the users input.We define a function called "reduce". The reduce function accepts the interger variable as a parameter.The code loop through the integer and check if it is divisible by 3. If the sum of the integer number is greater or equals to 20, we divide the resulting sum by 3 .If the integer is divisible by 3, we return "it is divisble by 3" and if it is not dividible by 3, it will return "it is not divisble by 3".learn more on python here: https://brainly.com/question/13437928
Which tags should be bolded?
Explanation:
As per the nature and importance of the context the certain words can be bolded to make them prominent.
It also refers to the type of sentence either .
negative interrogative simple sentenceUnder what scenarios can we clear the NVRAM by moving the PSWD jumper to the RTCRST
pins?
One can clear the NVRAM by moving the PSWD jumper to the RTCRST pins in the following scenarios:
When the computer system is on for 10 secondsWhen the jumper is set to the closed positionWhat is a jumper ?A jumper (usually found on early days computers) is used when the computer needs to close an electrical circuit
The NVRAM which means a non-volatile random-access memory can be reset or clear when the computer system is on for 10 seconds and when the jumper is set to the closed position
Read more about computer at:
https://brainly.com/question/24032221
Restarting a computer which is already on is referred as
Answer:
what is compute
Explanation:
computer is machine
Misinformations about Corona virus
Answer:
be in a crowded place without a mark
PLS HELP In VPython, finish the code to draw a horizontal axis.
origin = vector (0, 0, 0)
axis = cylinder(pos=origin, axis=vector(________)
options are (50, 0, 0), (0, 50, 0) and (0, 0, 50)
its NOT (0, 50, 0)
Use the knowledge in computational language in python to write a code that draw a horizontal axis with vectors.
How to define vectors in Python?In Python it is possible to define a vector with characters, forming a word, that is, a string of characters, which is abbreviated as "string". To do this, you can assign it as a constant or read the data as a word.
So in an easier way we have that the code is:
mybox = box(pos=vector(x0,y0,z0),
axis=vector(a,b,c)
length=L,
height=H,
width=W,
up=vector(q,r,s))
See more about python at brainly.com/question/18502436
Sorry for being late, but the answer is...
50, 0, 0
PROOF:
Look at the lines that say health, dental, and retirement which statement below is accurate
The statement that is accurate is that Those lines represent insurance and retirement plans that Hope funds directly from her paycheck.
What is a retirement plan?A retirement plan is known to be a type of plan that has been set up to take handle all the needs of a post-retirement days.
This was designed to help a person have a stress-free life. A retirement savings plan is one that helps to your money to grow and care for your life.
See full question below
Look at the lines that say HEALTH, DENTAL, and RETIREMENT. Which statement below is accurate? Those lines represent taxes that Hope paid to the Federal government b. Those lines represent taxes that Hope paid to the state government Those lines represent benefits that the employer is paying to Hope in addition to her wages d. Those lines represent insurance and retirement plans that Hope funds directly from her paycheck
Learn more about retirement plans from
https://brainly.com/question/12143528
What is the binary of the following numbers
10
6
22
12
You can use this table to help you!
Answer:
10 = 00001010
6 = 00000110
22 = 00010110
12 = 00001100
type of software designed for users to customise programs is?
In this lab, you will implement a temperature converter in JavaScript. The user may type a temperature in either the Celsius or Fahrenheit textbox and press Convert to convert the temperature. An image displays based on the converted temperature. (see the image uploaded here)
Use the knowledge in computational language in JAVA to write a code that convert the temperature.
How do I convert Celsius to Fahrenheit in Java?So in an easier way we have that the code is:
Fahrenheit to celsius:/* When the input field receives input, convert the value from fahrenheit to celsius */
function temperatureConverter(valNum) {
valNum = parseFloat(valNum);
document.getElementById("outputCelsius").innerHTML = (valNum-32) / 1.8;
}
Celsius to Fahrenheit:function cToF(celsius)
{
var cTemp = celsius;
var cToFahr = cTemp * 9 / 5 + 32;
var message = cTemp+'\xB0C is ' + cToFahr + ' \xB0F.';
console.log(message);
}
function fToC(fahrenheit)
{
var fTemp = fahrenheit;
var fToCel = (fTemp - 32) * 5 / 9;
var message = fTemp+'\xB0F is ' + fToCel + '\xB0C.';
console.log(message);
}
cToF(60);
fToC(45);
See more about JAVA at brainly.com/question/12975450
A set of processes and procedures that transform data into information and knowledge is
a.
Computer system
b.
Business system
c.
Database system
d.
Knowledge system
e.
Information system
Answer:
the answer is information system
A set of processes and procedures that transform data into information and knowledge is an Information system, which is the correct answer that would be an option (D).
What is the information system?Information system(IS) refers to systematic, social, and technical, organizational systems that obtain, process, store, and distribute information. Information systems are made up of four components from a socio-technological standpoint: task, people, structure (or roles), and technology.
A computer information system is a system that processes or interprets data that is made up of people and computers.
The term is also used in more limited contexts to refer only to the software used to run a computerized database or to refer only to a computer system.
Thus, a set of processes and procedures that transform data into information and knowledge is an Information system.
Hence, the correct answer would be an option (D).
To learn more about the Information system click here:
https://brainly.com/question/28945047
#SPJ2
What does the standard deviation of a set of data tell you?
O A. The smallest data value
B. Whether the data are spread out or not
O C. How many data points there are
O D. The maximum value of the data
SU
Answer: It tells us about how our set of data is spread out as compared to our mean or expected value.
Explanation: Note: Standard deviation is represented by Greek Letter sigma.For example: A teacher in a class of particular students takes a learning ability test from the students. Average or mean marks of students is 52 with +/- 10 marks. Then 1σ (Sigma = standard deviation) it means 1 standard deviation = 68% students will lie in between 52 + 10 =62 marks and 52-10 = 42 marks region. 2σ (2 standard deviation) means among the students 95% of them will lie between 52 + 20 =72 and 52-20= 32 marks region.3σ (3 standard deviation) means 99.7% of the students will lie in the region where 52 + 30 = 82 and 52 – 30 = 22 marks region. So for 3σ (3 Standard Deviations), only 0.3% of the total students deviate +/-30 marks from the average. It means 0.15% students will have marks less than 22 and 0.15% students will have marks greater than 82. In the schematic attached, I have tried to make you understand through a diagram. Please refer to the schematic 1. It tells us about the how our set of data is spread out as compared to our average or mean. And distance from mean can be calculated through number of standard deviations that the data is how much below or above the average.For example:For 1σ 68% students will come under the curve of “Average Learners” and rest of 32% will come under the curve of “Poor Learners” and “Very Talented Learners”.For 2σ 95% of the students will come under the curve of “Average Learners” and rest will come under the curve of “Poor Learners” and “Very Talented Learners”.For 3σ 99.7% of the students will come under the curve of “Average Learners” and rest of 0.3% will come under the curve of “Poor Learners” and “Very Talented Learners”.
Why do crawlers not use POST requests?
Answer:
Generally they do not do POST requests. This is just the current state of affairs and is not dictated anywhere, I believe. Some search engines are experimenting with crawling forms, but these are still GET requests.Explanation:
The following code appears in a sort function. Will this function sort in increasing order (smallest first) or decreasing order (largest first)? Explain your answer if (list[index] < list[index + 1]) { temp = list [index]; list[ index] = list [index +1]; list[index +1] = temp; }
A sort function sorts in an ascending or desceding order
The true statement is that the function would sort in decreasing order.
What is a sort function?A sort function is a code segment that is used to reorder a list in ascending or descending order, when called or evoked
The order of the sort functionThe code segment is given as:
if (list[index] < list[index + 1]) {
temp = list [index];
list[ index] = list [index +1];
list[index +1] = temp;
}
In the above code, we can see that the code compares a list element with the next element on the list, and the larger value comes to the front
This means that the sort function sorts in decreasing order
Read more about code segments at:
https://brainly.com/question/16397886
20
Select the correct answer
Mike logged into a shopping website and entered his username and password, which protocol will the website use to verify his credentials?
A HTTP
B SMTP
C. СМР
D. POP3
E. LDAP
Answer:
LDAP
Explanation:
The Lightweight Directory Access Protocol (LDAP) is a vendor-neutral application protocol used to maintain distributed directory info in an organized, easy-to-query manner. That means it allows you to keep a directory of items and information about them. This allows websites to verify credentials when accessing websites.
Write a program that allows two players (player X and player O) to play a game of tic-tac-toe. Use a two- dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk (*). The players take turns making moves and the program keeps track of whose turn it is. Player X moves first. The program should run a loop that:
#include <iostream>
using namespace std;
//function prototypes
void showBoard(char[][3]);
bool checkWinner(char[][3], char);
void playerMove(char[][3], char);
int main()
{
//declare variables needed
//declare 2D array for the board
//and initialize with all *
char board[3][3] = {{'*', '*', '*'},
{'*', '*', '*'},
{'*', '*', '*'}};
int moves = 0; //variable to keep track
//of number of moves
//to determine tie
cout << "TIC - TAC - TOE\n\n";
//while loop to repeat until 9 moves are done
while(true){
//display board
showBoard(board);
cout << "Player 1 moves\n";
//get player X move
playerMove(board, 'X');
//increment moves counter
moves++;
//if this is a winning move
//store winner and terminate
if(checkWinner(board, 'X')){
showBoard(board);
cout << "\nPlayer 1 (X) wins!\n";
return 0;
}
//if 9 moves are done
//break from loop
if(moves == 9)
break;
//display board again
showBoard(board);
cout << "Player 2 moves\n";
//do the same thing for player O
playerMove(board, 'O');
moves++;
if(checkWinner(board, 'O')){
showBoard(board);
cout << "\nPlayer 2 (O) wins!\n";
return 0;
}
}
//if we have gone this far and program
//still has not terminated (no winner)
//it means this is a tie
showBoard(board);
cout << "This game is a tie!\n";
//return 0 to mark successful completion of program
return 0;
}
//this function is helpful because we need to show
//the board repetitively during the program
void showBoard(char board[][3]){
cout << endl;
//loop on the rows
for(int row = 0; row < 3; row++){
//loop on the columns
for(int col = 0; col < 3; col++)
cout << board[row][col] << " ";
//display newline after each row
cout << endl << endl;
}
cout << endl;
}
//this function checks if second argument
//is a winning player
bool checkWinner(char board[][3], char player){
//boolean variable to check
//for winner later
bool flag;
//CHECK FOR WINNER IN ROWS
for(int row = 0; row < 3; row++){
//initialize flag to true
flag = true;
//loop within a row
for(int col = 0; col < 3; col++){
//Notice that the right part of the
//assignment operator, is an expression
//with a relational operator (==)
//this expression will yield either
//true (1) or false (0)
//while flag is already true (1)
//if multiplied by true (1) will result
//in true(0), or multiplied by false (0)
//will result in false (0)
flag *= (board[row][col] == player);
}
//after checking within row, if the flag
//is still true at this point, it means we have
//three chars of the same kind within the row,
//thus we have a winner
if(flag)
return true;
else
continue;
}
//CHECK FOR WINNER IN COLUMNS
//using a similar logic
for(int col = 0; col < 3; col++){
flag = true;
for(int row = 0; row < 3; row++){
flag *= (board[row][col] == player);
}
if(flag)
return true;
else
continue;
}
//CHECK FIRST DIAGONAL (row = col)
//reset flag to true
flag = true;
//check diagonal
for(int i = 0; i < 3; i++){
flag *= (board[i][i] == player);
}
//check if there is winner
if(flag)
return true;
//CHECK OTHER DIAGONAL (row = 2 - col)
//reset flag to true
flag = true;
//check diagonal
for(int col = 0; col < 3; col++){
flag *= (board[2-col][col] == player);
}
//check if there is winner
if(flag)
return true;
//if all of these have been checked
//and function still has not returned,
//it means there is no winner
return false;
}
//this function gets a move from the player,
//checks if it is valid, and if yes it puts
//it on the board
void playerMove(char board[][3], char player){
//variables to store user move
int row, col;
//get user move
cout << "Row: ";
cin >> row;
cout << "Col: ";
cin >> col;
//check if this is valid move
//you have to check if that tile has
//already been marked, or if tile
//of choice is out of bounds of board
while(board[row-1][col-1] != '*' ||
row > 3 || row < 0 ||
col > 3 || row < 0)
{
cout << "Invalid move! Try again\n";
cout << "Row: ";
cin >> row;
cout << "Col: ";
cin >> col;
}
//after validation, mark new move
board[row-1][col-1] = player;
}
Answer:
if on edgen. The answer is c
Explanation:
Which of the following are logical functions? Select all the options that apply.
Answer:
functions (reference)
Function Description
IFS function Checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition.
NOT function Reverses the logic of its argument
OR function Returns TRUE if any argument is TRUE
// This pseudocode segment is intended to compute and display
// the average grade of three tests for any number of students.
// The program executes until the user enters a negative value
// for the first test score.
start
Declarations
num test1
num test2
num test3
num average
housekeeping()
while test1 >= 0
mainLoop()
endwhile
endOfJob()
stop
housekeeping()
output "Enter score for test 1 or a negative number to quit"
return
mainLoop()
output "Enter score for test 2"
input test2
average = (test1 + test2 + test3) / 3
output "Average is ", average
output "Enter score for test 1 or a negative number to quit"
input tesst1
return
endOfJob()
output "End of program"
return
The pseudocode to calculate the average of the test scores until the user enters a negative input serves as a prototype of the actual program
The errors in the pseudocodeThe errors in the pseudocode include:
Inclusion of unusable segmentsIncorrect variablesIncorrect loopsThe correct pseudocodeThe correct pseudocode where all errors are corrected and the unusable segments are removed is as follows:
start
Declarations
num test1
num test2
num test3
num average
output "Enter score for test 1 or a negative number to quit"
input test1
while test1 >= 0
output "Enter score for test 2"
input test2
output "Enter score for test 3"
input test3
average = (test1 + test2 + test3) / 3
output "Average is ", average
output "Enter score for test 1 or a negative number to quit"
input test1
endwhile
output "End of program"
stop
Read more about pseudocodes at:
https://brainly.com/question/11623795
Can someone give me answers for 1-4
Answer:
you want me help u with this one?
2. The different amount of shades of color
3. The artist had given every marvel or DC or villian the color that fit them and the texture is also very nice in the picture.
4. The artist maybe could make the pic a little bit more high quality cause in the image is sort of blurry and you cant really see the further people that well.
Try it
Which phrases best describe plagiarism? Check all that apply.
presenting someone else's words as if they were your own
using someone else's idea without giving him or her credit
quoting and citing information as a reference or source
using an idea you found online and claiming it as your own
presenting your own original ideas
Answer:
Using Someone else's idea without giving him or her credit
Explanation:
In My Opinion
Answer:
124 :)
Explanation:
Which programming term describes the value that is passed to a method when called
so that the method knows what to do?
A parameter
An argument
A function
A variable
The programming term that describes the value that is passed to a method when called so that the method knows what to do is an Argument
What is an Argument?
An argument in Programming are variables used to specify a value when you want to call a fuhnction which provides the programs utilizing more informathion.
A bettrer understanding is as follows:
create a function, pass in data in the form of an argumentProgram utilizes more information from the value of the argument.For example
Say you want to create a function that describes how much money you're having; We can use artgument to descriptive as possible.
Before now, the function may have looked like:
string howMuchmoney() {
return "so much money";
Modifying the function prototype and implementation to take a string argument, it becomes
string howMuchmoney(string amount);
Change your return statement to:
return amount + "money";
Add a string to the parentheses where you call the function:
howMuchmoney("tons of")
Learn more in using Argument here:https://brainly.com/question/6067168
Which is the best explanation for why tutorials are useful?
Answer:
Tutorials are important for your learning because you can:
Solve problems in a team, develop your group skills, and get to know your peers better (which may come in handy when picking group members for group projects) Prepare for and/or review midterms and exams. Clarify any concepts that you might not understand.
Explanation:
Hope it helps
can anyone tell me about Microsoft some important features for partical
Intro to Computer Science:
A zero-tolerance policy means that if the employee violates the policy, they will be _____.
promoted
fired
warned
reprimanded
The correct answer is: fired :)
A zero-tolerance policy means that if the employee violates the policy, they will be fired. Thus, the correct answer is option B.
What is a Zero-tolerance policy?A zero tolerance policy is one that penalizes every violation of a stated rule. People in positions of authority are prohibited by zero tolerance policies from exercising discretion or changing punishments to fit the circumstances subjectively. They must impose a predetermined punishment regardless of individual guilt, extenuating circumstances, or history.
Zero tolerance policies are studied in criminology and are used in both formal and informal policing systems worldwide. If an employee violates the policy, there will be no tolerance and they will be fired.
Therefore, a zero-tolerance policy means that if the employee violates the policy, they will be fired.
To learn more about zero-tolerance policy, click here:
https://brainly.com/question/27293242
#SPJ2
Complete the sentence.
Times New Roman, Courier New, Arial and Verdana are all examples of _____.
1. web-safe colors
2. web-safe fonts
3. formatting templates
4. accessible fonts
Answer:
web-safe fonts
Explanation:
Because if you look at the different fonts they are all readable
Answer: 2. web-safe fonts
Explanation: got it right on edgen
what is the important of hvac?
Answer:
Moreover, buildings need HVAC installed in them because:
HVAC systems are used for controlling the overall climate in a building. ...
HVAC fosters enhanced productivity in offices as they feel comfortable. ...
HVAC improves air quality in the building, helping make it appropriate for human breathing and comfort. ...
HVAC systems help you achieve more savings when it comes to energy bills
Explanation:
Answer:
Units larger than a terabyte include a petabyte, exabyte, zettabyte, yottabyte and brontobyte. A geopbyte is also larger than a terabyte and refers to 10 30 bytes, or 1,000 brontobytes. Additional units of measurement become necessary as the amount of data in the world increases.
Explanation:
what is seo stands for?
S.E.O. stands for "Search Engine Optimization"
Explanation ↓
In the abbreviation S.E.O.,
"S" stands for "Search"
"E" stands for "Engine"
"O" stands for "Optimization"
Therefore, S.E.O. or SEO stands for "Search Engine Optimization"hope helpful ~
Answer:
SEO=
Search
Engine
Optimization
Hope this helps^^^
A victimless crime is committed when
|. Select 3 options.
someone downloads a pirated song or video
a copyrighted image is used without permission
a stranger accesses your internet banking
a person downloads and uses pirated software
a hacker sells a company's financial statements
A victimless crime is committed when a copyrighted image is used without permission 2. a stranger accesses your internet banking 3. a hacker sells a company’s financial statements.
Victimless crimes are illegal acts that break the laws, but there is no single victim of the crime. They are against social values and laws. A copyrighted image is used without permission
Examples are gambling, traffic violations, etc. Thus, Victimless crimes differ from other types of crime because it does not have an identifiable victim. This crime is against laws and social values and beliefs.
To know more about victimless crimes, visit:
brainly.com/question/17251009
#SPJ6
8. Show that x = xy + xy'
a) Using truth tables
b) Using Boolean identities
Answer:
B
Explanation:
Cause Show that x =Xy plus xy' is common = is Using Boolean Identify? tY me
why is this not working for my plus membership
Answer:
The overwhelming main cause for PlayStation Plus subscriptions not being recognised is because of PlayStation server maintenance which prevents your PS4 from communicating with Sony and discovering that you are a paid up PS Plus subscriber.
Consider the following program written in C syntax:
void swap(int a, int b) {
int temp;
temp = a;
a = b;
b = temp;
} void main() { int value = 2, list[5] = {1, 3, 5, 7, 9};
swap(value, list[0]);
swap(list[0], list[1]);
swap(value, list[value]);
}
For each of the following parameter-passing methods, what are all of the
values of the variables value and list after each of the three calls to
swap?
1. Passed by value
2. Passed by reference
3. Passed by value-result
6.
The values of the variables value and list after each of the three calls to
swap are:
value = 2 and list[5] = {1, 3, 5, 7, 9};value = 2 and list[5] = {3, 1, 5, 7, 9};value = 2 and list[5] = {3, 1, 5, 7, 9};How to determine the values of variable value and the list?1. Passed by value
In this case, the values of the actual arguments remain unchanged; So the variable value and the list would retain their initial values
The end result is:
value = 2 and list[5] = {1, 3, 5, 7, 9};
2. Passed by reference
With pass by reference, the arguments are changed.
Given that
value = 2 and list[5] = {1, 3, 5, 7, 9};
The value of variable value is swapped with list[0].
So, we have:
value = 1 and list[5] = {2, 3, 5, 7, 9};
Then list[0] and list[1] are swapped
So, we have:
value = 1 and list[5] = {3, 2, 5, 7, 9};
Lastly, value and list[value] are swapped
So, we have:
value = 2 and list[5] = {3, 1, 5, 7, 9};
The end result is:
value = 2 and list[5] = {3, 1, 5, 7, 9};
3. Passed by value-result
Since there is no loop in the program, the pass by value-result has the same output as the pass by reference.
So, the end result is:
value = 2 and list[5] = {3, 1, 5, 7, 9};
Read more about C syntax at:
https://brainly.com/question/15705612