Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers that follow.If the input is:5246810Then the output is:all evenIf the input is:513579

Answers

Answer 1

Answer:

uuuuu

Explanation:

Answer 2

Answer:

57677748957394209690369-34064666

Explanation:


Related Questions

Given a variable that contains mixed collection types, update the provided function to display the first inital and last name of the instructor:

Update the function to accept a list and the name of the instructor you wish to find.
Update the function to reformat the name of the instructor and return it back to the calling program.
If the instructors name is entered as John Smith then the function should return back J. Smith
If the instructors name is entered as Tracy Anne Rios then the function should return back T. Rios
If the instructors name is entered as Jackson then the function should return back Jackson
Add in any exception handling for the following scenarios:
Exceptions related to accessing the list or dictionary should output the message: Instructor not found.
All other exceptions should output the message: An error has occurred.
Test to ensure the program passes the provided test cases found in the TESTS.md file
Hints
You may only use a try/except block, no if statements
Figure out how to use only one return in the method

Tests.md:
Input

Amy Williams
Output

A. Williams
Case 2
Input

Sarah Jane Smith
Output

S. Smith
Case 3
Input

Thomas Tom
Output

Instructor not found.

What i have so far
#!/usr/bin/env python3
# Discussion 10.2: Collection Type Exceptions

# Task 1. Modify Functions for Names
def get_initial_name(initials, name):
list = instructor_name.split(' ') # this function returns a list
try:
initial = list[0][0]
name = list[-1]
f_name = initial + '. ' + name
except:
return 'Instructor not found'

# DO NOT MODIFY BELOW
if __name__ == "__main__":

courses = [
{ "name": "Amy Andrews", "courseName": "Math I", "units": 3 },
{ "name": "Bryan Bravo", "courseName": "English I", "units": 3},
{ "name": "Charles Chavez", "courseName": "Physics I", "units": 3 },
{ "name": "Daniel Diaz", "courseName": "Chemistry I", "units": 3 },
{ "name": "Edgar Allen Elam", "courseName": "Math II", "units": 3 },
{ "name": "Felicia Farr", "courseName": "Music I", "units": 3 },
{ "name": "GarthGarcia", "courseName": "Physical Education I", "units": 3 }
]

# Take Input
instructor_name = input("> ")

# Output the Result
print(get_initial_name(courses, instructor_name))

Answers

Given an independent variable it dependent variable of cobtriallex vainest update the function of reformat the name of the insurance company

Which one of the following is small and portable?
• Server
• Notebook
• Mainframe
• Desktop

Answers

Answer:

server is small and portable

The capability of moving a completed programming solution easily from one type of computer to another is known as ________. Group of answer choices

Answers

Answer: Portability

Explanation: I hope it helps you!

For security reasons, the network administrator needs to prevent pings into the corporate networks from hosts outside the internetwork. Which protocol should be blocked with access control lists

Answers

Answer:

ICMP

Explanation:

g The reduced ISA consists of four instructions: What are those instructions and what does each instruction do

Answers

The ISA is run by some set of instructions. This instructions are;

1.  Arithmetic: This Instructions perform various Arithmetic functions

2. Logical:  This instruction often carryout Logical operations on one or more operands.

3. Data transfer: This handles the transfer of instructions from memory to the processor registers and then backward process again.

4. Flow control: These instructions helps in breaking the sequential flow of instructions and jumping to instructions at different locations.  

Instruction set is simply known to be a full combination /number of instructions that are understood by a CPU.

It is know as a machine code that is often written in binary, and shown by assembly language.

Learn more from

https://brainly.com/question/22740965

A programmer will typically write a(n) _____ and pass it to the interpreter. Group of answer choices object method variable script

Answers

Answer:

Script

Explanation:

A set of code blocks which is written to solve a particular problem in a certain programming language and passed to the interpreter to run is called a script.

The script is program's body which is made up of codes written in accordance to the syntax of a certain programming language.

In other to execute the program written, it has to be passed to the interpreter, which run the script and produces an output.

Hence, the set of code written by a programmer is called the script.

Learn more :https://brainly.com/question/14364607

Create a procedure named STATUS_SHIP_SP that allows an employee in the Brewbeans' Shipping Department to update an order status to add shipping information. The BB_BASKETSTATUS table lists events for each order so that a shopper can see the status, date, and comments as each stage of the order process is finished. The IDSTAGE column of the BB_BASKETSTATUS table identifies each stage; the value 3 in this column indicates that an order has been shipped. The procedure should allow adding a row with an IDSTAGE of 3, date shipped, tracking number and shipper. The BB_STATUS_SEQ sequence is used to provide a value for the primary key column. Test the procedure with the following information: o Basket # = 3 o Date shipped = 20-FEB-12 o Shipper = UPS o Tracking # = ZW2384YXK4957

Answers

Answer:

c

Explanation:

A procedure named STATUS_SHIP_SP that allows an employee in the Brewbeans' Shipping Department to update an order status to add shipping information is in the explanation part below.

A representative from Brewbeans' shipping division can change an order's status and add shipment details by using the PL/SQL method STATUS_SHIP_SP, as shown in the following example:

CREATE OR REPLACE PROCEDURE STATUS_SHIP_SP (

   p_basket_number   IN  NUMBER,

   p_date_shipped    IN  DATE,

   p_shipper         IN  VARCHAR2,

   p_tracking_number IN  VARCHAR2

)

IS

   v_status_id   NUMBER;

BEGIN

   -- Get the next value from the BB_STATUS_SEQ sequence

   SELECT BB_STATUS_SEQ.NEXTVAL INTO v_status_id FROM DUAL;

   

   -- Insert a new row into the BB_BASKETSTATUS table

   INSERT INTO BB_BASKETSTATUS (STATUSID, BASKETNO, IDSTAGE, STATUSDATE, COMMENTS)

   VALUES (v_status_id, p_basket_number, 3, p_date_shipped, 'Shipped: ' || p_shipper || ', Tracking Number: ' || p_tracking_number);

   

   -- Commit the transaction

   COMMIT;

   

   -- Display a success message

   DBMS_OUTPUT.PUT_LINE('Order status updated. Shipment information added.');

EXCEPTION

   WHEN OTHERS THEN

       -- Display an error message

       DBMS_OUTPUT.PUT_LINE('Error: Unable to update order status.');

       -- Rollback the transaction

       ROLLBACK;

END;

/

Thus, by doing this, the procedure will be called with the specified parameters, and if successful, a new entry with the proper shipping information for basket number 3 will be added to the BB_BASKETSTATUS database.

For more details regarding SQL, visit:

https://brainly.com/question/34315524

#SPJ6

Where is RAM installed?

Answers

The CPU socket hope that helps

Answer: RAM is located in the central processing unit or CPU which is also called a processor. This is located inside the computer case on the motherboard.

Would appreciate brainly <3

Using WEKA software, answer the following questions based on the Phishing dataset provided.
a) Draw a simple confusion matrix (general one, not from WEKA) of the possible data scenarios for this
Phishing dataset. (0.5 Mark)
b) Draw a table that will outline the Accuracy, Precision, Recall, F-Measure, ROC Area of the following
Rules based algorithms; RIPPER (JRip), PART, and Decision Table (2 Marks)
c) Use Decision Trees algorithms (Random Forest, Random Tree) and Artificial Neural Network
(Multilayer Perceptrol) to compare with the results in part b) above. Do you have better prediction
accuracy with these in this dataset? (2 Marks)
d) What is your conclusion in these experiments pertaining to ML algorithms used? (0.5 Mark)

Answers

Answer:

This isn’t a difficult question, its a task

Explanation:

30th Nov 2020. Difference between Data and Information

Answers

Answer:

Data is a collection of unstructured or unorganized facts and figures.

Information is a collection of processed data.

Hope it helps...............

You are a knowledge engineer and have been assigned the task of developing a knowledge base for an expert system to advise on mortgage loan applications. What are some sample questions you would ask the loan manager at a bank?​

Answers

As a knowledge engineer, it should be noted that some of the questions that should be asked include:

What do you expect in the loan application process?How is the loan going to be processed?What do you expect from the applicant to fund the loan?

A knowledge engineer simply means an engineer that's engaged in the science of building advanced logic into the computer systems.

Since the knowledge engineer has been assigned the task of developing a knowledge base for an expert system to advise on mortgage loan applications, he should asks questions that will be vital for the loan process.

Learn more about engineers on:

https://brainly.com/question/4231170

What is a storage device? Give one example of Primary magnetic storage, Primary optical storage and Portable storage.

Answers

Answer:

fácil solo ve a tu almacenamiento y aprende

Primary optical storage

#include
void main()
{
int m=45,first,last;
first=m/10;
last=m%10;
printf("%d",first);//line 1
printf("\n%d",last);//line 2
printf("\nSum=%d",first*last);//line 3
printf("\n%d",first*last);//line 4
printf("\n%d",last*last);//line 5
printf("\nCube=%d",first*first*first);//line 6
}


Select the correct output for line 1 ~
1 point
4
5
0

Answers

Answer:

4

Explanation:

45 divided by 10 using integer division is 4

I ran the program, output is below.

How does a computer work?

Answers

Answer:

A computer is a Device that can run multiple applications at a time and access the internet where you can find online stores and more also used to make video calls and more.

A computer system works by combining input, storage space, processing, and output. ... It is known as Computer Memory that keeps the data into it. A computer uses a hard drive for storing files and documents. It uses two types of memory, i.e., internal memory and external memory.

Big Chungus is god. prove me wrong.

Answers

Answer:

who is Big chungus???

Believe in Lord Buddha !

In order to send and receive packets in the Internet, hosts require an IP address. What are the 2 ways a host can obtain an IP address

Answers

Answer:

Explanation:

An IP address is a 32-bit number. It uniquely identifies a host (computer or other device, such as a printer or router) on a TCP/IP network.

IP addresses are normally expressed in dotted-decimal format, with four numbers separated by periods, such as 192.168.123.132. To understand how subnet masks are used to distinguish between hosts, networks, and subnetworks, examine an IP address in binary notation.

For example, the dotted-decimal IP address 192.168.123.132 is (in binary notation) the 32-bit number 110000000101000111101110000100. This number may be hard to make sense of, so divide it into four parts of eight binary digits.

These 8-bit sections are known as octets. The example IP address, then, becomes 11000000.10101000.01111011.10000100. This number only makes a little more sense, so for most uses, convert the binary address into dotted-decimal format (192.168.123.132). The decimal numbers separated by periods are the octets converted from binary to decimal notation.

For a TCP/IP wide area network (WAN) to work efficiently as a collection of networks, the routers that pass packets of data between networks don't know the exact location of a host for which a packet of information is destined. Routers only know what network the host is a member of and use information stored in their route table to determine how to get the packet to the destination host's network. After the packet is delivered to the destination's network, the packet is delivered to the appropriate host.

For this process to work, an IP address has two parts. The first part of an IP address is used as a network address, the last part as a host address. If you take the example 192.168.123.132 and divide it into these two parts, you get 192.168.123. Network .132 Host or 192.168.123.0 - network address. 0.0.0.132 - host address.

The second item, which is required for TCP/IP to work, is the subnet mask. The subnet mask is used by the TCP/IP protocol to determine whether a host is on the local subnet or on a remote network.

In TCP/IP, the parts of the IP address that are used as the network and host addresses aren't fixed. Unless you have more information, the network and host addresses above can't be determined. This information is supplied in another 32-bit number called a subnet mask. The subnet mask is 255.255.255.0 in this example. It isn't obvious what this number means unless you know 255 in binary notation equals 11111111. So, the subnet mask is 11111111.11111111.11111111.00000000.

Lining up the IP address and the subnet mask together, the network, and host portions of the address can be separated:

11000000.10101000.01111011.10000100 - IP address (192.168.123.132)

11111111.11111111.11111111.00000000 - Subnet mask (255.255.255.0)

The first 24 bits (the number of ones in the subnet mask) are identified as the network address. The last 8 bits (the number of remaining zeros in the subnet mask) are identified as the host address. It gives you the following addresses:

11000000.10101000.01111011.00000000 - Network address (192.168.123.0)

00000000.00000000.00000000.10000100 - Host address (000.000.000.132)

So now you know, for this example using a 255.255.255.0 subnet mask, that the network ID is 192.168.123.0, and the host address is 0.0.0.132. When a packet arrives on the 192.168.123.0 subnet (from the local subnet or a remote network), and it has a destination address of 192.168.123.132, your computer will receive it from the network and process it.

Almost all decimal subnet masks convert to binary numbers that are all ones on the left and all zeros on the right. Some other common subnet masks are:

Decimal Binary 255.255.255.192 1111111.11111111.1111111.11000000 255.255.255.224 1111111.11111111.1111111.11100000

Internet RFC 1878 (available from InterNIC-Public Information Regarding Internet Domain Name Registration Services) describes the valid subnets and subnet masks that can be used on TCP/IP networks.

Hope this helps!

Fill in the blank with the correct response.

_____is considered a reliable source of free and trial software.

Answers

Shareware hope that helps

Write a function remove_duplicates that removes duplicates from an array. For example, if remove_duplicates is called with an array containing 1, 4, 9, 16, 9, 7, 4, 9, 11 … then the array is changed to 1, 16, 7, 4, 9. 11. Your function should have a reference parameter for the array size that is updated when removing the duplicates

Answers

The function is an illustration of loops

Loops are used to perform repetitive operations

The function in Java where comments are used to explain each line is as follows:

//This defines the remove_duplicates function

public static int remove_duplicates(int arr[], int n){

 //If the length of the array is 0 or 1, then return the original array

 if (n == 0 || n == 1) {

  return n;

 }

 //This creates a new array

 int[] newArr = new int[n];

 

 //This initializes the index of the array to 0

 int ind = 0;

 //This iterates through the original array

 for (int i = 0; i < n - 1; i++) {

     //The following loop populates the new array with the unique elements of the original array

  if (arr[i] != arr[i + 1]) {

   newArr[ind++] = arr[i];

  }

 }

 newArr[ind++] = arr[n - 1];

 // The following loop changes the original array

 for (int i = 0; i < ind; i++) {

  arr[i] = newArr[i];

 }

 return ind;

}

At the end of the function, the duplicate elements of the array are removed

Read more about similar programs at:

https://brainly.com/question/22552591

Write a recursive function called DigitCount() that takes a positive integer as a parameter and returns the number of digits in the integer. Hint: The number of digits increases by 1 whenever the input number is divided by 10. Ex: If the input is:

Answers

Recursive functions are functions that are called from within itself

The recursive function DigitCount() in Python where comments are used to explain each line is as follows:

#This defines the function

def countDigits(n):

   #If the integer is less than 10

   if n< 10:

       #Then the integer has 1 digit

       return 1

   #Otherwise,  

   else:

       #Count the number of integers

       return 1 + countDigits(n / 10)

At the end of the function, the count of integers is returned to the main function

Read more about similar programs at:

https://brainly.com/question/20397067

What was the goal of the COMPETES Act of 2007?

Answers

Simply put, the goal was, "To invest in innovation through research and development, and to improve the competitiveness of the United States."

Answer:

Increasing federal investment in scientific research to improve U.S. economic competitiveness.

Explanation:

Hope this helps!

If there are over 1,000 websites about a certain topic, the information is reliable. A. True B. False

Answers

Answer:

If they all have the same answer it is true, but if they are all different check with trusted sources

Explanation:

What does “The Principle of Least Privilege” mean as applied to security?

Answers

Answer:

The principle of least privilege (PoLP) refers to an information security concept in which a user is given the minimum levels of access – or permissions – needed to perform his/her job functions. ... Least privilege enforcement ensures the non-human tool has the requisite access needed – and nothing more.

Explanation: let me know if this helps!

Can someone help me explain Nvm scheduling in operating systems?

Answers

Low-power and short-latency memory access is critical to the performance of chip multiprocessor (CMP) system devices, especially to bridge the performance gap between memory and CPU

Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one word names (until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one ordering per line.

Answers

The solution is the recursive Python 3 function below:

########################################################

def allNamePermutations(listOfNames):

   # return all possible permutations of listOfNames

   if len(listOfNames) == 0 or len(listOfNames) == 1:

       # base case

       return [listOfNames]

   else:

       # recursive step

       result_list = [ ]

       remaining_items = [ ]

       for firstName in listOfNames:

           remaining_items = [otherName for otherName in listOfNames if

                                                                     (otherName != firstName)]

           result_list += concat(firstName,

                                              allNamePermutations(remaining_items))

       return result_list

#######################################################

How does the above function work?

As with all recursive functions, this one also has a base case, and a recursive step. The base case tests to make sure the function terminates. Then, it directly returns a fixed value. It does not make a recursive call.

In the case of this function, the base case checked listOfNames to see if it was empty or only had one name. If any of the conditions were satisfied, a new list containing listOfNames is returned.

The recursive step is where the function allNamePermutations() calls itself recursively. The recursive step handles the case where listOfNames has more than one item. This step first iterates over each name in listOfNames, and then does the following;

Gets a name in listOfNameGets a list of other names in listOfNamesCalls allNamePermutations() on the list of other names to get a list of permutation of the other names.

        (By first getting the list of other names before passing it into

         allNamePermutations(), we make sure the recursive step eventually

         terminates. This is because we are passing a smaller list each time

         we make the recursive call.)

Inserts the current name in front of each permutationAdds the results to the result list to be returned later

After the iteration, it returns the result list which will now contain all permutations of the names in the list.

The concat function is defined below

##################################################

def concat(name, listOfNameLists):

   # insert name in front of every list in listOfNameLists

   result_list = [ ]

   for nameList in listOfNameLists:

       nameList.insert(0, name)

       result_list.append(nameList)

   return result_list

#####################################################

If we run the sample test case below

####################################

name_list = ['Adam', 'Barbara', 'Celine']

allNamePermutations(name_list)

####################################

the following output is produced

[['Adam', 'Barbara', 'Celine'],

['Adam', 'Celine', 'Barbara'],

['Barbara', 'Adam', 'Celine'],

['Barbara', 'Celine', 'Adam'],

['Celine', 'Adam', 'Barbara'],

['Celine', 'Barbara', 'Adam']]

For another example of how to use recursion in Python, see the following example in the link below

https://brainly.com/question/17229221

3 3) Why computer is called non-inteligent , IN Dull machine?

Answers

Answer:

Computers are dull: The CPU is the Central Processing Unit or the brains of the computer. The CPU knows what to do with machine language instructions. It doesn't understand them; it just knows what to do with them.

Explanation:

Hope I could help.

                                 please mark as brainliest

Write a function named partfthat takes inas parameterstwo parallel lists: a list of times (in increasing order), and a list of distance traveled by that point in time. The function should return a new list giving the average velocity between consecutive time measurements. The new list should have a length of one less than the original lists.

Answers

The program calculates the velocity between points in a list is written below. The program is written in python 3 thus ;

t = input("Enter time values : ")

#Enter the time values of the data

p = input("Enter distance values : ")

#Enter the distance values

dist = [float(x) for x in p.split()]

time = [float(x) for x in t.split()]

#pyt then values in a list

def partfthat(dist, time):

#initialize function that takes in two parameters

vel = []

#empty list to hold the calculated velocity values

i = 0

#indexer

while i <= len(dist)-2:

#while loop to iterate

v = (dist[i+1] - dist[i]) / (time[i+1] -time[i])

#Use the velocity formula

vel.append(v)

#append values to the empty list created

i+=1

return vel

print(avg_vel(dist, time))

A sample run of the program is attached.

Learn more : https://brainly.com/question/25681441

Identify the false statement. a. When you use inheritance to create a class, you save time because you can copy and paste fields, properties, and methods that have already been created for the original class. b. When you use inheritance to create a class, you reduce the chance of errors because the original class's properties and methods have already been used and tested. c. When you use inheritance to create a class, you make it easier for anyone who has used the original class to understand the new class because such users can concentrate on the new features.

Answers

Uploading this answer for points please do not accept this answer thank you.

What type of database replication relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy

Answers

Database replication is very common in this Era. Traditional database replication is relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy.

Database replication  is known to be the constant electronic copying of data from a database using one computer or server that is connected also to a database in another . this ensure that all users do share the same level of information.

Replication is often done to technologies which are used for copying and distributing data and database objects from one database to another and thereafter use in synchronizing between databases.

Conclusively, Replicas can only be made in the Traditional database replication through the power of centralized control.

See full question below

What type of database replication relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy?

a distributed database model

b. traditional database replication

c. enterprise replication

d. local database model

Learn more about database replication from

https://brainly.com/question/6447559

Do you have any concerns or worries about how you will manage your course assignments or expectations? Your journal entry will only be seen by you and your instructor, so feel free to share any questions and worries you have.

Answers

Answer:

no worries at all.

yeah-ya..... right?

Develop an algorithm and draw a flowchart to determine and input number is palindrome or not.​

Answers


function checkPalindrome(str){
let reversed = str.split("").reverse().join("")
return str === reversed
}
let str1 = "anna"
let str2 = "banana"
let str3 = "kayak"
checkPalindrome(str1)
// -> true
checkPalindrome(str2)
// -> false
checkPalindrome(str3)
// -> true
Other Questions
Why did the English monarch want to establish the colony of Georgia Initially, Kristen smoked only 3-5 cigarettes a day. Now, for her to feel in control during the day, she has to smoke 18 cigarettes. What is she experiencing Determine the slope of the line represented by the equation 9x + 4y = 8. Represent the slope in decimal form. How To Get To London Southend Airport Taxi? If 77.0 mL of nitrogen gas is collected over water at 50 C and 763 mm Hg, what is the volume of dry nitrogen gas at STP? The vapor pressure of water at 50 C is 92.5mm Hg. I agree to hire you for 30 days. You can decide between two methods of payment: either (1) $1000 a day, or (2) one penny on the first day, two pennies on the second day and continue to double your daily pay each day up to day 30. Use quick estimation to make your decision, and justify it What is the function of the word ''and'' in the sentence? 5.23 LAB: Contains the characterWrite a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. The output of the program is every word in the list that contains the character at least once. For coding simplicity, follow each output word by a comma, even the last one. Add a newline to the end of the last output. Assume at least one word in the list will contain the given character.Ex: If the input is:4 hello zoo sleep drizzle zthen the output is:zoo,drizzle,To achieve the above, first read the list into a vector. Keep in mind that the character 'a' is not equal to the character 'A'. What is clay item?Give your own no rude answer. 14 In which group are all the elements foundnaturally only in compounds?(1). 18(3) 11(2) 2(4) 14 Help.....Me...........PLEASE Two sailboats started at the same location. Sailboat A traveled 5 miles west, thenturned 29 toward the north and continued for 8 miles. Sailboat B first went southfor 8 miles, then turned 51 toward the east and continued for 5 miles. Whichsailboat was farther from the starting point? Explain your reasoning. may I have another helping of pie the base of a triangle is eight less than twice its height, if the area of the triangle is 5cm^2 find the length of the base which outcome of india's independence movement did Mohandas Gandhi not support? Many engines in FWD vehicles must be removed with the transmission still attached.O a. TrueO b. False PLEASE HURRYEnvironment refers to the social and physical conditions that affect a person's life. Please select the best answer from the choices provided OT OF Francesca tried to evaluate an expression. Here is her work: 3(5)2183 = 3(25)183 = 75183 = 573 = 19 Is Francesca's work correct? What effects did changes in transportation have on travel? Valentine's Day is coming up, so Sweet Dreams chocolate shop is ordering ribbon to decorate gift boxes. Small gift boxes use 20 inches of ribbon, while large ones use 30 inches. Sweet Dreams expects to sell 225 small boxes and 180 large boxes. If the ribbon they use is sold by the yard, how many yards of ribbon should they order?