Transaction is an action or series of actions the execution of which should lead to a consistent database state from another consistent database state. Discuss which properties that transactions should have for their correct executions. Provide two examples to support your answer.

Answers

Answer 1

Explanation:

A transaction is a very small system unit that can contain many low-level tasks. A transaction in a database system should maintain, Atomicity, Consistency, Isolation, and Durability − these are commonly known as ACID properties − in order to ensure accuracy, completeness, and integrity of the data.

An example of a simple transaction is as below,  Suppose a bank employee transfers Rs 500 from A's account to B's account.

A’s Account

Open_Account(A)

Old_Balance = A.balance

New_Balance = Old_Balance - 500

A.balance = New_Balance

Close_Account(A)

B’s Account

Open_Account(B)

Old_Balance = B.balance

New_Balance = Old_Balance + 500

B.balance = New_Balance

Close_Account(B)


Related Questions

Which component allows you to enjoy cinematic
or 3-D effects on your computer?
A.Cache memory
B.Ethernet port
C.external hard drive
D.video and sound cards

Answers

external hard drive

external hard drive

Answer:

Amswer would be D

Explanation:

Java programing:
Add two more statements to main() to test inputs 3 and -1. Use print statements similar to the existing one (don't use assert)
import java.util.Scanner;
public class UnitTesting {
// Function returns origNum cubed
public static int cubeNum(int origNum) {
return origNum * origNum * origNum;
}
public static void main (String [] args) {
System.out.println("Testing started");
System.out.println("2, expecting 8, got: " + cubeNum(2));
/* Your solution goes here */
System.out.println("Testing completed");
return;
}
}
__________

Answers

Answer:

import java.util.Scanner;

public class UnitTesting {

   // Function returns origNum cubed

   public static int cubeNum(int origNum) {

       return origNum * origNum * origNum;

   }

   public static void main (String [] args) {

       System.out.println("Testing started");

       System.out.println("2, expecting 8, got: " + cubeNum(2));

       System.out.println("3, expecting 27, got: " + cubeNum(3));

       System.out.println("-1, expecting -1, got: " + cubeNum(-1));

       System.out.println("Testing completed");

       return;

   }

}

Explanation:

Added statements are highlighted.

Since the cubeNum function calculates the cube of the given number and we are asked to write two statements to test inputs 3 and -1, pass the parameters 3 and -1 to the function called cubeNum and print the results using print statements

Output values below an amount
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value.
Ex: If the input is 5 50 60 140 200 75 100, the output is:
For coding simplicity, follow every output value by a space, including the last one.
Such functionality is common on sites like Amazon, where a user can filter results.
LAB
ACTIVITY
8.3.1: LAB: Output values below an amount
0 / 10
Submission Instructions
These are the files to get you started.
main.cpp
Download these files
Compile command
g++ main.cpp -Wall -o a.out
We will use this command to compile your code

Answers

Answer:

def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):

  for value in user_values:

      if value < upper_threshold:

          print(value)  

def get_user_values():

  n = int(input())

  lst = []

  for i in range(n):

      lst.append(int(input()))

  return lst  

if __name__ == '__main__':

  userValues = get_user_values()

  upperThreshold = int(input())

  output_ints_less_than_or_equal_to_threshold(userValues, upperThreshold)

Explanation:

Wireshark capture files, like the DemoCapturepcap file found in this lab, have a __________ extension, which stands for packet capture, next generation.

(a) .packcng
(b) .paccapnextg
(c) .pcnextgen
(d) .pcapng

Answers

Answer:

Option (d) is correct

Explanation:

Previously saved capture files can be read using Wireshark. For this, select the File then open the menu. Then Wireshark will pop up the “File Open” dialog box.

Wireshark capture files, like the DemoCapturepcap file found in this lab, have a .pcapng extension, which stands for packet capture, next generation.

Create a Python program that: Allows the user to enter a person's first name and last name. The user should be able to enter as many names as they desire. Create a function that takes the first name and last name, puts them together with the last name first, followed by the first name; with the names separated by commas. Take the result from the function, and place the resulting name in a list. Once the user finishes entering names, sort the contents of the list. Write the sorted names from a list into a text file. When you create the text file, allow the user to enter a name for the file to be created. After you finish writing names to the file, close the file and end the program.

Answers

Answer:

#main function start

def main():

#list to store names entered by user

name_list=[]

#variable to take input from user to keep rotating the loop and take input from user again and again

ch='y'

fname=""

lname=""

while ch=='y' or ch=='Y':#keep the loop taking input from user till user do not want to enter more

#take input from user

name=[]

fname=input("Enter first name: ")

lname=input("Enter last name: ")

name.append(fname)

name.append(lname)

 

#append the previously input first and last name in main list

name_list.append(name)

ch=input("Do you want to continue: (y/Y for yes)")

#main function end

#get file name from user

filename=input("Enter output file name")

#open file in write mode

file=open(filename,"w")

#keep loop add data in file till main list 'name_list' have

for i in name_list:

#Write data in file

file.write("%s, %s\r\n" % (i[0],i[1]))

#close the file

file.close()

#call main function

main()

Explanation:

input the above code and see output

In which situations would it be most helpful to filter a form? Check all that apply.

Answers

Filtering is a useful way to see only the data that you want displayed in Access databases.

Francis has designed a picture book appropriate for third graders. He wants teachers across the world to freely download use, and distribute his work, but he would still like to retain his copyright on the content. What type of license should he u for his book?

Answers

Answer:

The correct answer will be "Project Gutenberg".

Explanation:

Project Gutenberg continues to obtain lots of requests for authorization for using printed books, pictures, as well as derivatives from eBooks. Perhaps some applications should not be produced, because authorization would be included in the objects provided (as well as for professional usages).You can copy, hand it over, or m actually-use it underneath the provisions including its license that was included in the ebook.

So that the above is the right answer.

Write a short program in C that will display the following information:
Name : Phones:
email:
Hometown:
High School(s):
Previous colleges:
List college math/CS courses:
What, when, and where was your last math and cs course?
Type(s) of computers that you are confident working on:
Extracurricular activities (jobs, clubs, sports, etc.)
Favorite books, movies, music:
What you plan to do after graduation? (Be as specific as you can.)
Be sure to include all necessary documentation within your code

Answers

Answer:

Explanation:

The objective of this question and what we are meant to do is to compute a short program in C++ that will display the information given in the question.

Let get started!.

C ++ Program Code.

#include <iostream>

#include<string>

using namespace std;

int main()

{

string name,email,hometown,highschool,previousColleges,mathOrCSCource,lastMathOrCSCource,CompType,ExtraCur,FavBook

,planAfterGrad,phone;

//Reading Data

cout<<"Name:";

getline(cin,name);

cout<<"Phone:";

getline(cin,phone);

cout<<"Email:";

getline(cin,email);

cout<<"HomeTown:";

getline(cin,hometown);

cout<<"High School(s):";

getline(cin,highschool);

cout<<"Previous Colleges:";

getline(cin,previousColleges);

cout<<"List of math/CS Cources:";

getline(cin,mathOrCSCource);

cout<<"When,Where and what was your last math or CS course:";

getline(cin,lastMathOrCSCource);

cout<<"Type(s) of computer you are confident working with:";

getline(cin,CompType);

cout<<"ExtraCurricular Activities (job,club,sports,etc.):";

getline(cin,ExtraCur);

cout<<"Favourite books,movies,music:";

getline(cin,FavBook);

cout<<"What you plan to do after Graduation:";

getline(cin,planAfterGrad);

//Printing data

cout<<"--------------------Printing Data---------------------------"<<endl;

cout<<"Name:"<<name<<endl;

cout<<"Phone:"<<phone<<endl;

cout<<"Email:"<<email<<endl;

cout<<"HomeTown:"<<hometown<<endl;

cout<<"High School(s):"<<highschool<<endl;

cout<<"Previous Colleges:"<<previousColleges<<endl;

cout<<"List of math/CS Cources:"<<mathOrCSCource<<endl;

cout<<"When,Where and what was your last math or CS course:"<<lastMathOrCSCource<<endl;

cout<<"Type(s) of computer you are confident working with:"<<CompType<<endl;

cout<<"ExtraCurricular Activities (job,club,sports,etc.):"<<ExtraCur<<endl;

cout<<"Favourite books,movies,music:"<<FavBook<<endl;

cout<<"What you plan to do after Graduation:"<<planAfterGrad<<endl;

return 0;

}

Write a short assembly language program in either our 8088 SCO DOSBox or 80386+ MASM Visual Studio 2017 environment that demonstrates data storage and retrieval from memory. As an example consider some value which is either 16 or 32 bits, after instantiating as an immediate value transfer to and retrieve from memory using assembly language instructions.

Answers

Answer: provided in the explanation section

Explanation:

The question says:

Write a short assembly language program in either our 8088 SCO DOSBox or 80386+ MASM Visual Studio 2017 environment that demonstrates data storage and retrieval from memory. As an example consider some value which is either 16 or 32 bits, after instantiating as an immediate value transfer to and retrieve from memory using assembly language instructions.

The Answer:

multi-segment executable file template. data segment ; add your data here! pkey db "press any key...$" ends stack segment dw 128 dup(0) ends code segment start: ; set segment registers: mov ax, data mov ds, ax mov es, ax ; add your code here mov cx,4 input: mov ah,1 int 21h push ax loop input mov dx,13d mov ah,2 int 21h mov dx,10d mov ah,2 int 21h mov cx,4 output: pop bx mov dl,bl mov ah,2 int 21h loop output exit: lea dx, pkey mov ah, 9 int 21h ; output string at ds:dx ; wait for any key....

mov ah, 1 int 21h mov ax, 4c00h ; exit to operating system. int 21h ends end start ;

set entry point and stop the assembler.

Cheers I hope this helps!!!

Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, print "Too few.". If more than 4, print "Too many.". Else, print "N: Lather and rinse." numCycles times, where N is the cycle number, followed by "Done.". End with a newline. Example output for numCycles = 2:
1: Lather and rinse.
2: Lather and rinse.
Done.
Hint: Define and use a loop variable.
Sample program:
#include
using namespace std;

int main() {
PrintShampooInstructions(2);
return 0;
}

Answers

Answer:

public static void PrintShampooInstructions(int numberOfCycles){

       if (numberOfCycles<1){

           System.out.println("Too Few");

       }

       else if(numberOfCycles>4){

           System.out.println("Too many");

       }

       else

           for(int i = 1; i<=numberOfCycles; i++){

               System.out.println(i +": Lather and rinse");

           }

       System.out.println("Done");

   }

Explanation:

I have used Java Programming language to solve this

Use if...elseif and else statement to determine and print "Too Few" or "Too Many".

If within range use a for loop to print the number of times

Answer:

#In Python

def shampoo_instructions(num_cycles):

   if num_cycles < 1: ///

       print ('Too few.') ///

   elif num_cycles > 4:

       print ('Too many.')

   else:

       i = 0

       while i<num_cycles:

           print (i+1,": Lather and rinse.")

           i = i + 1

       print('Done.')

user_cycles = int(input())

shampoo_instructions(user_cycles)

Explanation:

def shampoo_instructions(num_cycles): #def function with loop

   if num_cycles < 1:  #using 1st if statement

       print('Too few.')

   elif num_cycles > 4:

       print ('Too many.')

   else:

       i = 0

       while i<num_cycles:

           print (i+1,": Lather and rinse.")

           i = i + 1

       print('Done.')

user_cycles = int(input())

shampoo_instructions(user_cycles)

A small publishing company that you work for would like to develop a database that keeps track of the contracts that authors and publishers sign before starting a book. What fields do you anticipate needing for this database

Answers

Answer:

The database can include the fields related to the Author such as name and address, related to Publisher such as publisher's name and address, related to book such as title and ISBN of the book and related to contract such as payment schedule, contract start and end.

Explanation:

The following fields can be needed for this database:

Author First_NameAuthor's Last_NameAuthors_addressPublisher_namePublisher_addressBook_titleBook ISBNcontract date : this can be start_date (for starting of contract) and end_date ( when the contract ends) payment_made: for payment schedule.

For this assignment, you will create flowchart using Flow gorithm and Pseudocode for the following program example: Hunter Cell Phone Company charges customer's a basic rate of $5 per month to send text messages. Additional rates apply as such:The first 60 messages per month are included in the basic billAn additional 10 cents is charged for each text message after the 60th message and up to 200 messages.An additional 25 cents is charged for each text after the 200th messageFederal, state, and local taxes add a total of 12% to each billThe company wants a program that will accept customer's name and the number of text messages sent. The program should display the customer's name and the total end of the month bill before and after taxes are added.

Answers

Answer:

The pseudocode is as given below while the flowchart is attached.

Explanation:

The pseudocode is as follows

input customer name, number of texts  

Set Basic bill=5 $;

if the number of texts is less than or equal to 60

Extra Charge=0;

If the number of texts is greater than 60 and less than 200

number of texts b/w 60 and 200 =number of texts-60;

Extra Charge=0.1*(number of texts b/w 60 and 200);

else If the number of texts is greater than 200

number of texts beyond 200 =number of texts-200;

Extra Charge=0.25*(number of texts beyond 200)+0.1*(200-60);

Display Customer Name

Total Bill=Basic bill+Extra Charge;

Total Bill after Tax=Total Bill*1.12;

Look at these examples:- • Men are not emotional. • Women are too emotional. • Jewish people are good business people. • The French are great lovers. • Old people are useless. • Young people are sex mad. • Black people are poor. • Thin people are self-disciplined. • Fat people are clumsy. • Rock stars are drug addicts. To what extent do you agree with these statements? Make a note of which ones you agree with

Answers

Answer:

None

Explanation:

These are all stereotypes. Sure, there are definitely some people who fit their stereotypes, but not all. It's just a generalization at the end of the day. I can't really agree with any of them due to the fact that it's all stereotyping.

Perhaps you feel differently, and believe that some of these example are true. I can't though, sorry. Hope this take helps.

A(n) _____ element, as described by the World Wide Web Consortium (W3C), is an element that "represents a section of a page that consists of content that is tangentially related to the content around that element, and which could be considered separate from that content."

Answers

Answer:

B. Aside element

Explanation:

The options for this question are missing, the options are:

A. ​article element

B. ​aside element

C. ​section element

D. ​content element

An aside element is defined as a section of a page that has content that is tangentially related to the content around the element. In other words, the aside element represents content that is indirectly related to the main content of the page. Therefore, we can say that the correct answer to this question is B. Aside element.

. The total processing speed of microprocessors (based on clock rate and number of circuits) is doubling roughly every year. Today, a symmetric session key needs to be 100 bits long to be considered strong. How long will a symmetric session key have to be in 30 years to be considered strong?

Answers

Answer:

130 bits

Explanation:

If the length of a key = N bits

Total number of key combinations = [tex]\frac{2^{N} }{2}[/tex]

For a key length of 100, the total number of key combinations will be  [tex]\frac{2^{100} }{2} = 2^{99}[/tex] combinations. This is a whole lot and it almost seems impossible to be hacked.

The addition of  one bit to the length of the symmetric key in 1 year is sufficient to make the key strong, because even at double its speed, the processor can still not crack the number of combinations that will be formed.

Therefore, if a bit is added to the key length per year, after 30 years, the length of the symmetric session key will be 130 bits.

You are working at the Acme company that has the following environment: 400 Windows Servers 2. 8000 Windows client devices (laptops running Windows os) 40 Linux servers Active Directory Domain Services to provide dns services to all the hosts, both Windows and Linux. Acme acquires a small research company, Uni-Tech that uses Unix servers for all of its applications. For host resolution they use BIND
a. Describe what BIND is and what the acronym stands for? BIND stands for Berkley Internet Name Domain. BIND allows you to pick one of your computers to act as the DNS server.
b. This acquisition happens very quickly and on day one the business needs people at Uni-Tech to connect to hosts at Acme using hosts names that can be resolved by Active Directory. Describe a method for integrating the two environments that does not require too many individual tasks that will take many hours. (10) Describe how you would test to make sure your integration is working correctly.

Answers

Answer: Provided in the explanation section

Explanation:

(a). BIND is a type of DNS server used on the internet, actually it is reported to be most widely used DNS server on the internet. Also BIND is the de-facto standard on Unix like operating systems and Linux. Thus it can be used to locate computers on a network using domain names instead of their IP addresses. BIND was originally programmed at the University of California, Berkeley in the 1980s, this was made possible by a grant from US based DARPA program.

Originally, BIND stood for Berkeley Internet name daemon, but nowadays it is called Berkeley Internet name domain.

(b). In some of the clients in windows and Windows servers we will install LDP. By the LDP.exe we can test tDNS, Active directory woking , even we can add or modify. LDP is used to test and verify the Active Directory objects. We will install in windows machine then open the software, then from the menu we will select connect and type the IP adress of the Active Directory then we will select or type the objects of Active directory. For Linux system we have to openldap and can search the AD.

From Linux or Unix we can use the nmap tool which can test the network connectivity between all the computers whether it is windows or Linux. By nmap we can test by ICMP protocol to verify the network connectivity. By nmap we can scan all the port which are required to open from client to the server. We can also use nslookup to test DNS server from the client. By nslookup we can check that client can connect the server.

You are a network technician for a small corporate network that supports 1000 Mbps (Gigabit) Ethernet. The manager in the Executive Office says that his network connection has gone down frequently over the past few days. He replaced his Ethernet cable, but the connection problem has continued. Now his network connection is either down or very slow at all times. He wants you to install a new 1000 Mbps Ethernet network card in his workstation to see if that solves the problem.
If the new card does not resolve the issue, you will need to perform troubleshooting tasks to find the cause of the issue and confirm that the problem is fixed after you implement a solution. Following are some troubleshooting tasks you can try:
• Use the Network and Sharing Center and the ipconfig command on the Exec workstation to check for a network connection or an IP address.
• Look at the adapter settings to see the status of the Ethernet connection.
• Use the ping command to see if the workstation can communicate with the server in the Networking Closet. (See the exhibit for the IP address.)
• View the network activity lights for all networking devices to check for dead connections. In this lab, your task is to complete the following:
1. Install a new Ethernet adapter in one of the open slots in the Exec workstation per the manager's request.
2. Make sure that the new adapter is connected to the wall outlet with a cable that supports Gigabit Ethernet.
3. Resolve any other issues you find using the known good spare components on the Shelf to fix the problem and restore the manager's internet connection.
After you replace the network adapter and resolve the issues you found while troubleshooting, use the Network and Sharing Center to confirm that the workstation is connected to the network and the internet
If necessary, click Exhibits to see the network diagram and network wiring schematics.

Answers

Answer:

The step by step explanation

Explanation:

Before doing anything, the first thing to do is to select the 100BaseTX network adapter and reconnect the Cat5e cable. The 100BaseTX network adapter supports Fast

Ethernet which is all that is required.

Now do the following steps:

Step one

In Office 2, switch to the motherboard view of the computer (turning off the workstation as necessary).

Step two

On the Shelf, expand the Network Adapters category.

Step three

Identify the network adapter that supports Fast Ethernet 100BaseTX. Drag the network adapter from the Shelf to a

free PCI slot on the computer.

Step four

To connect the computer to the network, switch to the back view of the computer.

Step five

Drag the Cat5 cable connector from the motherboard's NIC to the port of the 100BaseTX network adapter.

Step six

To verify the connection to the local network and the Internet, switch to the front view of the computer.

Step seven

Click the power button on the computer case.

Step eight

After the workstation's operating system is loaded, click the networking icon in the notification area and click

Open Network and Sharing Center. The diagram should indicate an active connection to the network and the

Internet.

For one to be able to confirm the speed of the connection, it can be done by clicking the Local Area Connection link in the Network and

Sharing Center.

Max magnitude Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the method in a program that takes two integer inputs, and outputs the largest magnitude value. Ex: If the inputs are: 5 7 the method returns: 7 Ex: If the inputs are: -8 -2 the method returns: -8 Note: The method does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the absolute-value built-in math method. Your program must define and call a method: public static int maxMagnitude(int userVal1, int userVal2)

Answers

Answer:

The java program is as follows.

import java.lang.*;

public class Numbers

{

   //variables to hold two numbers

   static int num1=-8, num2=-2;

   //method to return integer with higher magnitude

   public static int maxMagnitude(int userVal1, int userVal2)

   {

       if(Math.abs(userVal1) > Math.abs(userVal2))

           return userVal1;

       else    

           return userVal2;

   }

public static void main(String[] args) {

    int max = maxMagnitude(num1, num2);

 System.out.println("The number with higher magnitude among "+num1+ " and "+num2+ " is "+max);

}

}

OUTPUT

The number with higher magnitude among -8 and -2 is -8

Explanation:

1. Two integer variables are declared to hold the two numbers. The variables are declared at class level (outside main()) and declared static.

2. The variables are initialized with any random value.

3. The method, maxMagnitude(), takes the two integer parameters and returns the number with higher magnitude. Hence, return type of the method is int.

public static int maxMagnitude(int userVal1, int userVal2)

4. This method finds the number with higher magnitude using the Math.abs() method inside if-else statement.

               if(Math.abs(userVal1) > Math.abs(userVal2))

                   return userVal1;

        else    

                   return userVal2;

5. Inside main(), the method, maxMagnitude(), is called. This method takes the two variables as input parameters.

6. The integer returned by the method, maxMagnitude() is assigned to a local integer variable, max, as shown.

      int max = maxMagnitude(num1, num2);

7. The result is displayed to the user as shown.

System.out.println("The number with higher magnitude among "+num1+ " and "+num2+ " is "+max);

8. The class variables and the method, maxMagnitude(), are declared static so that they can be used and called inside main().

9. The variable, max, is called local variable since it can be used only within the main() where it is declared. It is not declared static.

10. The class is declared public since it has the main() method and execution begins with main().

11. The program is saved with the same name as the name of the public class having main(). In this case, the program is saved as Numbers.java.

12. No user input is taken for the two input parameter values. The static variables can be assigned any integer value and the program can be tested accordingly.

Alcatel-Lucent's High Leverage Network (HLN) increases bandwidth and network capabilities while reducing the negative impact on the environment. This works because the HLN:_____________.
a. Reduces or eliminates use of finite (non-renewable) radio frequencies utilized by wireless devices.
b. Reduces Radio Frequency Interference (RFI) - overcrowding of specific areas of the electromagnetic spectrum.
c. Limits the number of people who can access the network at any one time —particularly during times of peak energy demand.
d. Delivers increased bandwidth using fewer devices and energy.

Answers

Answer:

d. Delivers increased bandwidth using fewer devices and energy.

Explanation:

Alcatel-Lucent, formed in 1919 was a French global telecommunications equipment manufacturing company with its headquarter in Paris, France.

They provide services such as telecommunications and hybrid networking solutions deployed both in the cloud and properties.

Alcatel-Lucent's High Leverage Network (HLN) increases bandwidth and network capabilities while reducing the negative impact on the environment. This works because the High Leverage Network (HLN) delivers increased bandwidth using fewer devices and energy on Internet Protocol (IP) networks.

The Alcatel-Lucent's High Leverage Network (HLN) provides reduced cost of transmitting data as fewer network equipments are used with less adverse effects on the environment.

The High Leverage Network (HLN) when successfully implemented helps telecom firms to improve their operational efficiency, maintenance costs, and enhance network performance and capacity to meet the bandwidth demands of their end users.

The main() module in the starter code below takes integar inputs separated by commas from the user and stores them in a list. Then, it allows the user to manipulate the list using 3 functions:
mutate_list() takes 3 parameters -- a list, index number, and a value -- and inserts the value in the position specified by the index number in the list.
remove_index() takes 2 parameters -- a list and an index number -- and remove the element at the position number indicated by index. It also prints the total number of elements in the list before and after removing the character in this fashion:"Total elements in list = 11
Total elements in list = 10"
reverse_list() takes 1 parameter -- a list -- and returns the list reversed.
Examples:
Example 1:
Enter values in list separated by commas: 1,2,4,63,6,4,22,53,76
[1, 2, 4, 63, 6, 4, 22, 53, 76]
Menu:
mutate list(m), remove (r), reverse_list (R)
Enter choice (m,r,R): m
4,45
[1, 2, 4, 63, 45, 6, 4, 22, 53, 76]
Example 2:
Enter values in list separated by commas: 1,2,4,6,84,3,2,2,76
[1, 2, 4, 6, 84, 3, 2, 2, 76]
Menu:
mutate list(m), remove (r), reverse_list (R)
Enter choice (m,r,R): R
[76, 2, 2, 3, 84, 6, 4, 2, 1]
Example 3:
Enter values in list separated by commas: 12,2,3,5,2,6,2,1,2,333,65
[12, 2, 3, 5, 2, 6, 2, 1, 2, 333, 65]
Menu:
mutate list(m), remove (r), reverse_list (R)
Enter choice (m,r,R): r
Example 4
Total elements in list = 11
Total elements in list = 10
[12, 2, 3, 5, 6, 2, 1, 2, 333, 65]
please use the codes below
def main():
user_list = input("Enter values in list separated by commas: ")
user_list = user_list.split(",")
user_list = [int(i) for i in user_list]
print(user_list)
print("Menu: ")
print("mutate list(m), remove (r), reverse_list (R)")
user_choice = input("Enter choice (m,r,R): ")
if user_choice == 'm':
index_num, v = input().split(",")
index_num = int(index_num)
v = int(v)
mutate_list(user_list, index_num, v)
print(user_list)
elif user_choice == 'r':
index_num = int(input())
remove_index(user_list, index_num)
print(user_list)
elif user_choice == 'R':
new_list = reverse_list(user_list)
print(new_list)
main()

Answers

Find the given attachments

The beginning of a free space bitmap looks like this after the disk partition is first formatted: 1000 0000 0000 0000 0000 0000 0000 0000 (the first block is used by the root directory). The system always searches for free blocks starting at the lowest numbered block, so after writing file A, which uses 8 blocks, the bitmap looks like this 1111 1111 1000 0000 0000 0000 0000 0000. Show the bitmap after each of the following actions: (a) File B is written, using 12 blocks (b) File C is written, using 7 blocks (c) File A is deleted (d) File B is deleted (e) File D is written, using 6 blocks (f) File E is written, using 9 blocks Show all steps.

Answers

Hgvccnnfdknvjdkvkdjdi

The bitmap is 1110 0000 0001 0000 after some use. The system always looks for free blocks beginning using a contiguous allocation technique.

What is a bitmap?

After some use, the new bitmap is 1110 0000 0001 0000. The system employs a contiguous allocation mechanism and starts searching for free blocks at the position.

(a) File B is made up of five blocks, 1111 1111 1111 0000.

b) The batch number 1000 0001 1111 0000 deletes File A.

c) Eight blocks are used for writing in file C.

1111 1111 1111 1100

File B is deleted (d). 1111 1110 0000 1100

Free-space bitmaps are one method used by some file systems to keep track of allocated sectors. Even though the most fundamental implementation of free-space bitmaps is incredibly wasteful, some modern file systems use complex or hybrid versions of them.

Therefore, after some use, the bitmap is 1110 0000 0001 0000. The contiguous allocation strategy is always used by the system to look for free blocks to start with.

To learn more about bitmap, refer to the link:

https://brainly.com/question/26230407

#SPJ2

Write a program that keeps track of where cars are located in a parking garage to estimate the time to retrieve a car when the garage is full. This program will demonstrate the following:_________.
How to create a list for use as a stack,
How to enter and change data in a stack.

Answers

Answer: Provided in the explanation section

Explanation:

Code to use;

# Define the main() function.

def main():

   # Declare the required variables.

   stack_cars = []

   move_time = 1

   retrieve_time = 2

   # Start the loop to display the menu.

   while True:

       # Display the choices to the user.

       print("\n\t\t\t Car Stack Menu")

       print("\n1. Add a car")

       print("2. Retrieve a car")

       print("3. Show the car stack")

       print("4. Exit")

       # Prompt the user to enter the input.

       choice = input("\nEnter your choice: ")

       # Append the car in the stack if the choice is 1.

       if choice == '1':

           car = input("Enter the car name to add: ")

           stack_cars.append(car)

       

       # Remove the car from the stack if the choice is 2.

       elif choice == '2':

           car = input("Enter the car name to retrieve: ")

           # Display the error message if the car is not present.

           if car not in stack_cars:

               print(car + " is not present in the stack.")

           # Otherwise, compute the time to retrieve a car.

           else:

               # Declare a temp stack to move the cars.

               temp = []

               x = stack_cars.pop()

               count = 0

               # Start the loop to pop the cars from the stack

               # until the car to be retrieved is found.

               while x != car:

                   count += 1

                   # Store the car in the temp stack.

                   temp.append(x)

                   x = stack_cars.pop()

               # Start the loop to move the cars back in the

               # original stack.

               while len(temp) != 0:

                   stack_cars.append(temp.pop())

               # Compute and display the total time.

               total_time = move_time * count + retrieve_time

               print("Total time to retrieve", car, "=", total_time)

       

       # Display the stack if the choice is 3.

       elif choice == '3':

           print("Car stack =", stack_cars)

       # Return from the funtion if the choice is 4.

       elif choice == '4':

           print("Exiting from the program...")

           return

       

       # Display the message for invalid input.

       else:

           print("Error: Invalid choice!")

# Call the main() function.

if __name__ == "__main__":

   main()

Write a program that displays a menu allowing the user to select air, water, or steel, and then has the user enter the number of feet a sound wave will travel in the selected medium. The program should then compute and display (with four decimal places) the number of seconds it will take. Your program should check if the user enters a valid menu choice, if not, it should terminate with an appropriate message.

Answers

Answer:

yooooooooooooooooooooo

Explanation:

Array A is not a heap. Clearly explain why does above tree not a heap? b) Using build heap procedure discussed in the class, construct the heap data structure from the array A above. Represent your heap in the array A as well as using a binary tree. Clearly show all the steps c) Show how heap sort work in the heap you have constructed in part (b) above. Clearly show all the step in the heap sort

Answers

Answer:

Sorted Array A { } = { 1, 4, 23, 32, 34, 34, 67, 78, 89, 100 }

Explanation:

Binary tree is drawn given that the binary tree do not follow both minimum heap and maximum heap property, therefore, it is not a heap.

See attached picture.

Write a program that reads integers start and stop from the user, then calculates and prints the sum of the cubes (=> **3) of each integer ranging from start to stop, inclusive. "Inclusive" means that both the values start and stop are included.

Answers

Answer:

This program is written in python programming language

Comments are used for explanatory purpose;

Take note of indentations(See Attachment)

Program starts here

#Initialize Sum to 0

sum = 0

#Prompt user for start value

start= int(input("Start Value: "))

#Prompt user for stop value

stop= int(input("Stop Value: "))

#Check if start is less than stop

if(start<=stop):

       #Iterate from start to stop

       for i in range(start, stop+1, 1):

              sum+=i**3

else:

print("Start must be less than or equal to Stop")

#Display Result

print("Expected Output: ",sum)

#End of Program

Python high school assignment: please keep simpleIn pythonInstructionsUse the following initializer list:w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]Write a loop that prints the words in uppercase letters.Sample RunALGORITHMLOGICFILTERSOFTWARENETWORKPARAMETERSANALYZEALGORITHMFUNCTIONALITYVIRUSES

Answers

Answer:

w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

for i in range (len(w)):

   print(w[i].upper())

Explanation:

every element needs to be upper cased

A loop that prints the words in uppercase letters is written below with the help of Python.

What is a function?

Simply said, a function is a "chunk" of code that you may reuse repeatedly so instead of having to write it out several times. Software developers can divide an issue into smaller, more manageable parts, which can each carry out a specific task, using functions.

A function, according to a technical definition, is a relationship between an amount of parameters and a set of potential outputs, where every other input is connected to precisely one output.

All the functions are to be written in uppercase:

w = ["Algorithm", "Logic", "Filter", "Software", "Network", "Parameters", "Analyze", "Algorithm", "Functionality", "Viruses"]

for i in range (len(w)):

  print(w[i].upper())

Learn more about function, Here:

https://brainly.com/question/29050409

#SPJ5

2) An algorithm that takes in as input an array with n rows and m columns has a run time of O(nlgm). The algorithm takes 173 ms to run in an input array with 1000 rows and 512 columns. How long will the algorithm take to run on an input array with 1500 rows and 4096 columns? (Note: For ease of calculation, please use a base of 2 for your logarithm.)

Answers

Answer:

The algorithm takes 346 ms to run on an input array with 1500 rows and 4096 columns.

Explanation:

For an input array with 1000 rows and 512 columns, the algorithm takes 173 ms.

We want to find out how long will the algorithm take to run on an input array with 1500 rows and 4096 columns?

Let the algorithm take x ms to run 1500 rows and 4096 columns.

For an input of n rows and m columns, it takes

[tex]n \: log_{2} \:m[/tex]

So,

[tex]1000 \: log_{2} \:512 = 173 \\\\1000 \: log_{2} \:2^{9} = 173 \:\:\: ( 2^{9} = 512) \\\\1000 \times 9 = 173 \:\:\:\:\: \: \: eg. 1[/tex]

and

[tex]1500 \: log_{2} \:4096 = x \\\\1500 \: log_{2} \:2^{12} = x \:\:\: ( 2^{12} = 4096) \\\\1500 \times 12 = x \:\:\:\:\: \: \: eg. 2[/tex]

Now divide the eq. 2 by eq. 1 to find the value of x

[tex]\frac{1500 \times 12}{1000 \times 9} = \frac{x}{173} \\\\\frac{18000 }{9000} = \frac{x}{173} \\\\2 = \frac{x}{173} \\\\x = 2 \times 173 \\\\x = 346 \: ms[/tex]

Therefore, the algorithm takes 346 ms to run on an input array with 1500 rows and 4096 columns.

Suppose that the following two classes have been declared public class Car f public void m1) System.out.println("car 1"; public void m2) System.out.println("car 2"); public String toString) f return "vroom"; public class Truck extends Car public void m1) t System.out.println("truck 1"); public void m2) t super.m1); public String toString) t return super.toString) super.toString ); Write a class MonsterTruck whose methods have the behavior below. Don't just print/return the output; whenever possible, use inheritance to reuse behavior from the superclass Methog Output/Return monster 1 truck1 car 1 m2 toString "monster vroomvroom'" Type your solution here:

Answers

Answer: provided in the explanation section

Explanation:

// code to copy

Car.java

public class Car {

 

  public void m1()

  {

  System.out.println("car 1");

}

 

  public void m2() {

      System.out.println("car 2");

}

 

  public String toString()

  {

  return "vroom";

}

 

}

Truck.java

public class Truck extends Car{

 

  public void m1()

  {

  System.out.println("truck 1");

  }

 

  public void m2()

  {

  super.m1();

  }

 

  public String toString()

  {

      return super.toString() + super.toString();

  }

}

MonsterTruck​​​​​​​.java

public class MonsterTruck extends Truck

{

  public void m1() {

System.out.println("monster 1");

}

 

public void m2() {

super.m1();

super.m2();

}

 

public String toString() {

return "monster " + super.toString();

}

public static void main(String[] args) {

  MonsterTruck mt=new MonsterTruck();

  mt.m1();

  mt.m2();

  System.out.println(mt);

}

}

cheers i hope this helped !!!

Suppose you have 9 coins and one of them is heavier than others. Other 8 coins weight equally. You are also given a balance. Develop and algorithm to determine the heavy coin using only two measurements with the help of the balance. Clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms

Answers

Answer:

Following are the algorithm to this question:

Find_Heavier_Coins(Coin[9]):

   i) Let Coin[] Array represent all Coins.  

   ii) Divide coin[] into 3 parallel bundles and each has three coins, example 0-2, 3-5, 6-8 indicate a1 a2 a3

   iii) Randomly select any two bundles and place them in balance [say a1 and a2]

   iv) If Weigh of a1 and a2 has same:

           // checking that if a3 has heavier coin

           Choose any two 6-8 coins and place them onto balance [say 6 and 8]

           If those who weigh has the same weight:

               Third coin is coin heavier [say 7]

           else:  

               The coin [6 or 8] is the one which is heavier on the balance

       else:

           //The coin has the package which would be heavier on the balance [say a1]

           Select any two coins on balance from of the heavier package [say 0 and 1]

   If they weigh the same weight:

       Third coin is coin heavier [say 2]

   else:

       The coin that is heavier on the balance is the [or 0]

Explanation:

In the above-given algorithm code, a method Find_Heavier_Coins is declared which passes a coin[] array variable in its parameters. In the next step, if conditional block is used that checks the values which can be described as follows:

In the first, if block is used that checks a1 and a2 values and uses another if block in this it will print a3 value, else it will print 6 to 8 value. In the another, if the block it will check  third coins value and prints its value if it is not correct it will print first coin value

Which of the following meanings of the plus sign, +, are built-in to the language (and/or standard libraries or classes that we have been using with the language)?
A. Numeric subtraction
B. Numeric addition
C. string concatenation
D. The logical "or" operation

Answers

Answer:

Numeric Addition

Explanation:

Literally, the + sign is an arithmetic operator used to perform addition operation between numeric datatypes (integer, float, decimal, double, long integer, etc...)

Its default built in function of the plus is sign is to add variables, constants and/or expressions.

The plus sign is used as follows;

a = 5;

b = 3;

c = a + b

-------------

a + b = 5 + 3 = 8

8 will be saved in variable c. This is only possible using the plus sign.

The plus sign also has other function such as string concatenation but this function is language dependent (i.e. some programming languages do not use + for string concatenation).

Conclusively, the built in function of the plus sign is for numeric addition

Other Questions
Whats the correct answer for this ? Two chords AB and CD intersect at E. If AE = 2cm, EB =4, and CE = 2.5 cm, find the length of ED Six measurements were made of the magnesium ion concentration (in parts per million, or ppm) in a city's municipal water supply, with the following results. It is reasonable to assume that the population is approximately normal. Based on a 95% confidence interval for the mean magnesium ion concentration, is it reasonable to believe that the mean magnesium ion concentration may be greater than 199.5? (Hint: you should first calculate the 95% confidence interval for the mean magnesium ion concentration.) a) The likelihood cannot be determinedb) Yesc) No What preserves a shapes orientation? a. Vertical translation b. Reflection across the shapes base c. Rotation about its center The graph below represents the distance a pilot is from the home airport during a period of time. =))))))))))))))))))))))))) The base of a rectangular prism is 20 cm 2. If the volume of the prism is 100 cm 3, what is its height? A high-end clothing manufacturer has a policy to inspect each article of clothing before it is shipped to customers. Recently, the number of finished items that are failing this final inspection has more than doubled from 3% six months ago to 7% last month. This company would benefit from a strategy designed to: in javascript, what can I put after player. to make my character go in the center of the screen? like example: to put it at the bottom of the screen you put player.bottom(): to put it to the right of the screen you put player.right(): please help me i will mark brainlyest for the 1st correct answeri need to put my character in the center of the screen Phionia Phelps has developed a gourmet cat food. Not only is this food eagerly eaten by the most finicky felines, but it is specially formulated to prevent the many health problems of aging cats. Phionia has been making the food on her kitchen range and selling it at $250 per case only to close acquaintances who are also cat lovers. One of her wealthy acquaintances has now offered to invest in her business if Phionia will begin selling the product through her website. However, the investor wants Phionia to produce a budget for the first six months of operation. Based on her experience to date, Phionia predicts the following sales in cases: Each case of Finicky Feline Gourmet Cat Dinner requires 5 pounds of prime lamb meat, 10 pounds of short grain Chinese rice, 2 pounds of wild caught Alaskan salmon, and 1 pound of secret vitamins and supplements. Phionia plans to maintain end-of-month inventories equal to 10 percent of the next month's projected sales, to meet expected sales growth. All the ingredients inventories are to be maintained at 5 percent of the production needs for the next month, but not to exceed 1,000 pounds of any one ingredient. January will begin with all inventories at the projected levels. Phionia has the following price quotes good for the following year: The production process requires direct labor at two skill levels: (1) ingredient preparation, $18 per hour, and (2) cooking and canning, $24 per hour. Two workers are willing to work part days if there is not enough demand for them to work full time. lt takes one hour to process one batch. Because of preparation and cleanup time, only six batches can be produced per day. Each batch produces enough food to fill 100 cases. Manufacturing overhead is $6,000 fixed per month plus $15 per case. Item $ per poundLamb 15Rice 1,20Saimon 24Viamlns 45 1. Prepare the following budgets for the period. January through June:________. a. Sales budget in dollars. b. Production budget in units. c. Direct materials purchases budget in pounds. d. Direct materials purchases budget in dollars. e. Direct manufacturing labor budget in dollars. 2. Comment on the viability of this business and the advisability of the investor making a $50,000 investment to get it started. Once a bill leaves the Congress, how can a bill become a law? (Select all that anny Please help...What is an equation in terms of x and y that can be used to model the proportional relationship? A tank at is filled with of dinitrogen monoxide gas and of boron trifluoride gas. You can assume both gases behave as ideal gases under these conditions. Calculate the mole fraction and partial pressure of each gas, and the total pressure in the tank. Round each of your answers to significant digits. help help help help help help what is the role of the judicial branch under the constitution when asking a question there is a point thingy next to where you pick a subject.What is this for exactly?? Working on Summer Vacation. An Adweek/Harris (July 2011) poll found that 35% of U.S. adults do not work at all while on summer vacation. In a random sample of 10 U.S. adults, let x represent the number who do not work during summer vacation a. For this experiment, define the event that represents a "success" b. Explain why x is (approximately) a binomial random variable c. Give the value of p for this binomial experiment d. Find P(x = 3) e. Find the probability that 2 or fewer of the 10 U.S. adults do not work during summer vacation Noaya read a book cover to cover in a single session, at a rate of 55 pages per hour. After 4 hours, he had 350 pages left to read. Let y represent the number of pages left to read after x hours. What caused the mistake that led to the destruction of the Mar's rover? Parent organisms and offspring have what DNA? A food worker is cooking eggs that will be hot held what internal temperature must the eggs reach while cooking