Code:
def interest():
interest_rate = 0.06
investment = input(int('Investment: '))
yield = 0
year = 0
while (yield < investment):
year += 1
yield = investment * interest_rate
print (year)
NOTE: i wrote this code assuming that the investment for the next year is the same as the first year and so forth
Create a Python program that prints all the numbers from 0 to 4 except two distinct numbers entered by the user.
Note : Use 'continue' statement.
Here is a Python program that prints all numbers from 0 to 4, excluding two distinct numbers entered by the user, using the 'continue' statement:
```python
numbers_to_exclude = []
# Get two distinct numbers from the user
for i in range(2):
num = int(input("Enter a number to exclude: "))
numbers_to_exclude.append(num)
# Print numbers from 0 to 4, excluding the user-entered numbers
for i in range(5):
if i in numbers_to_exclude:
continue
print(i)
```
The program first initializes an empty list called `numbers_to_exclude` to store the two distinct numbers entered by the user.
Next, a loop is used to prompt the user to enter two distinct numbers. These numbers are appended to the `numbers_to_exclude` list.
Then, another loop is used to iterate through the numbers from 0 to 4. Inside the loop, an 'if' condition is used to check if the current number is in the `numbers_to_exclude` list. If it is, the 'continue' statement is executed, which skips the current iteration and proceeds to the next iteration of the loop.
If the current number is not in the `numbers_to_exclude` list, the 'print' statement is executed, and the number is printed.
This program ensures that the two distinct numbers entered by the user are excluded from the output, while all other numbers from 0 to 4 are printed.
For more such answers on Python
https://brainly.com/question/26497128
#SPJ8
Assuming the user types the sentence
Try to be a rainbow in someone's cloud.
and then pushes the ENTER key, what will the value of ch be after the following code executes?.
char ch = 'a';
cin >> ch >> ch >> ch >> ch;
(in c++)
The value of ch will be the character entered by the user after executing the code.
What is the value of ch after executing the code?The code snippet cin >> ch >> ch >> ch >> ch; reads four characters from the user's input and assigns them to the variable ch. Since the user input is "Try to be a rainbow in someone's cloud." and the code reads four characters, the value of ch after the code executes will depend on the specific characters entered by the user.
In conclusion, without knowing the input, it is not possible to determine the exact value of ch. Therefore, the value of ch will be the character entered by the user after executing the code.
Read more about code execution
brainly.com/question/26134656
#SPJ1
The programmer’s modification of the accounting system was:
Which of the following queries can have a fully Meets result?
Answer: we need the awnser key
Explanation:
if the bandwidth-delay product of a channel is 500 Mbps and 1 bit takes 25 milliseconds to make the roundtrip, what is the bandwidth-delay product
Answer:
2500 kb
Explanation:
Here, we are to calculate the bandwidth delay product
From the question, we are given that
band width = 500 Mbps
The bandwidth-delay product is = 500 x 10^6 x 25 x 10^-3
= 2500 Kbits
Can someone make a JavaScript code to make a turkey like this, with two trees in the background. DOES NOT HAVE TO LOOK EXACTLY LIKE THE PICTURE, it's just a reference for a turkey.
The code of JavaScript will be:
var turkey = {
x: 300,
y: 200,
draw: function() {
fill(255, 0, 0);
ellipse(this.x, this.y, 40, 40);
ellipse(this.x - 15, this.y - 10, 25, 25);
ellipse(this.x + 15, this.y - 10, 25, 25);
fill(0, 0, 0);
ellipse(this.x - 15, this.y - 10, 10, 10);
ellipse(this.x + 15, this.y - 10, 10, 10);
ellipse(this.x, this.y + 10, 20, 5);
}
}
turkey.draw();
What is JavaScript?
JavaScript, abbreviated as JS, is a programming language that, along with HTML and CSS, is a key component of the World Wide Web. As of 2022, 98% of websites on the client side use JavaScript for webpage functionality, with third-party libraries regularly added. All major web browsers include a JavaScript engine that executes code on the devices of users.
To learn more about JavaScript
https://brainly.com/question/28021308
#SPJ1
Classify the following into online and offline storage
CD-ROM,Floppy disk,RAM,cache Memory,Registers
RAM and cache memory are examples of online storage as they provide direct and fast access to data. CD-ROM, floppy disk, and registers are examples of offline storage as they require external devices or are part of the processor's internal storage.
Online Storage:
1. RAM (Random Access Memory): RAM is a type of volatile memory that provides temporary storage for data and instructions while a computer is running. It is considered online storage because it is directly accessible by the computer's processor and allows for fast retrieval and modification of data.
2. Cache Memory: Cache memory is a small, high-speed memory located within the computer's processor or between the processor and the main memory. It is used to temporarily store frequently accessed data and instructions to speed up processing. Cache memory is considered online storage because it is directly connected to the processor and provides quick access to data.
Offline Storage:
1. CD-ROM (Compact Disc-Read-Only Memory): A CD-ROM is a type of optical disc that stores data and can only be read. It is considered offline storage because data is stored on the disc and requires a CD-ROM drive to read the information.
2. Floppy Disk: A floppy disk is a portable storage medium that uses magnetic storage to store data. It is considered offline storage because it requires a floppy disk drive to read and write data.
3. Registers: Registers are small, high-speed storage locations within the computer's processor. They hold data that is currently being used by the processor for arithmetic and logical operations. Registers are considered offline storage because they are part of the processor's internal storage and not directly accessible or removable.
for more questions on memory
https://brainly.com/question/28483224
#SPJ11
Write a function called st_dev. st_dev should have one
Your friend Alicia says to you, “It took me so long to just write my resume. I can’t imagine tailoring it each time I apply for a job. I don’t think I’m going to do that.” How would you respond to Alicia? Explain.
Since my friend said “It took me so long to just write my resume. I can’t imagine tailoring it each time I apply for a job. I will respond to Alicia that it is very easy that it does not have to be hard and there are a lot of resume template that are online that can help her to create a task free resume.
What is a resume builder?A resume builder is seen as a form of online app or kind of software that helps to provides a lot of people with interactive forms as well as templates for creating a resume quickly and very easily.
There is the use of Zety Resume Maker as an example that helps to offers tips as well as suggestions to help you make each resume section fast.
Note that the Resume Builder often helps to formats your documents in an automatic way every time you make any change.
Learn more about resume template from
https://brainly.com/question/14218463
#SPJ1
A company that wants to send data over the Internet has asked you to write a program that will encrypt it so that it may be transmitted more securely. All the data is transmitted as four-digit integers. Your app should read a four-digit integer entered by the user and encrypt it as follows: Replace each digit with the result of adding 7 to the digit and getting the remainder after dividing the new value by 10. Then swap the first digit with the third, and swap the second digit with the fourth. Then display the encrypted integer. Write a separate app that inputs an encrypted four-digit integer and decrypts it (by reversing the encryption scheme) to form the original number. Use the format specifier D4 to display the encrypted value in case the number starts with a 0
Answer:
The output of the code:
Enter a 4 digit integer : 1 2 3 4
The decrypted number is : 0 1 8 9
The original number is : 1 2 3 4
Explanation:
Okay, the code will be written in Java(programming language) and the file must be saved as "Encryption.java."
Here is the code, you can just copy and paste the code;
import java.util.Scanner;
public class Encryption {
public static String encrypt(String number) {
int arr[] = new int[4];
for(int i=0;i<4;i++) {
char ch = number.charAt(i);
arr[i] = Character.getNumericValue(ch);
}
for(int i=0;i<4;i++) {
int temp = arr[i] ;
temp += 7 ;
temp = temp % 10 ;
arr[i] = temp ;
}
int temp = arr[0];
arr[0] = arr[2];
arr[2]= temp ;
temp = arr[1];
arr[1] =arr[3];
arr[3] = temp ;
int newNumber = 0 ;
for(int i=0;i<4;i++)
newNumber = newNumber * 10 + arr[i];
String output = Integer.toString(newNumber);
if(arr[0]==0)
output = "0"+output;
return output;
}
public static String decrypt(String number) {
int arr[] = new int[4];
for(int i=0;i<4;i++) {
char ch = number.charAt(i);
arr[i] = Character.getNumericValue(ch);
}
int temp = arr[0];
arr[0]=arr[2];
arr[2]=temp;
temp = arr[1];
arr[1]=arr[3];
arr[3]=temp;
for(int i=0;i<4;i++) {
int digit = arr[i];
switch(digit) {
case 0:
arr[i] = 3;
break;
case 1:
arr[i] = 4;
break;
case 2:
arr[i] = 5;
break;
case 3:
arr[i] = 6;
break;
case 4:
arr[i] = 7;
break;
case 5:
arr[i] = 8;
break;
case 6:
arr[i] = 9;
break;
case 7:
arr[i] = 0;
break;
case 8:
arr[i] = 1;
break;
case 9:
arr[i] = 2;
break;
}
}
int newNumber = 0 ;
for(int i=0;i<4;i++)
newNumber = newNumber * 10 + arr[i];
String output = Integer.toString(newNumber);
if(arr[0]==0)
output = "0"+output;
return output;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter a 4 digit integer:");
String number = sc.nextLine();
String encryptedNumber = encrypt(number);
System.out.println("The decrypted number is:"+encryptedNumber);
System.out.println("The original number is:"+decrypt(encryptedNumber));
}
}
What is a string and char data types? Are they both primitive or not? What situations would use one over the other? Do they integrate well with each other, if so, how do they and give some examples.
Character data is stored in a fixed-length field by the CHAR data type. A string is sometimes implemented as an array data structure of bytes (or words) containing a sequence of elements, typically characters, encoded in some way.
What is a string and char data types? A string is sometimes implemented as an array data structure of bytes (or words) containing a sequence of elements, typically characters, encoded in some way. A string is commonly regarded as a type of data. Strings can also be used to refer to more general arrays or other sequence (or list) data types and structures.Although the string data type is not a ninth primitive, it is a predefined non-primitive data type in Java. A string data type is used to store the sequence of characters when a char cannot store more than one character. Character data is stored in a fixed-length field by the CHAR data type.To learn more about string and char data refer to:
brainly.com/question/20813205
#SPJ1
24. Which of the following statements about Emergency Support Functions (ESFs) is correct?
O A. ESFs are not exclusively federal coordinating mechanism
O B. ESFs are only a state or local coordinating mechanism
O C. ESFs are exclusively a federal coordinating mechanism
O D. ESFs are exclusively a state coordinating mechanism
(ESFs) is correct: ESFs are not exclusively federal coordinating mechanism.
Which of the following if statements uses a Boolean condition to test: "If you are 18 or older, you can vote"? (3 points)
if(age <= 18):
if(age >= 18):
if(age == 18):
if(age != 18):
The correct if statement that uses a Boolean condition to test the statement "If you are 18 or older, you can vote" is: if(age >= 18):
In the given statement, the condition is that a person should be 18 years or older in order to vote.
The comparison operator used here is the greater than or equal to (>=) operator, which checks if the value of the variable "age" is greater than or equal to 18.
This condition will evaluate to true if the person's age is 18 or any value greater than 18, indicating that they are eligible to vote.
Let's analyze the other if statements:
1)if(age <= 18):This statement checks if the value of the variable "age" is less than or equal to 18.
However, this condition would evaluate to true for ages less than or equal to 18, which implies that a person who is 18 years old or younger would be allowed to vote, which is not in line with the given statement.
2)if(age == 18):This statement checks if the value of the variable "age" is equal to 18. However, the given statement allows individuals who are older than 18 to vote.
Therefore, this condition would evaluate to false for ages greater than 18, which is not correct.
3)if(age != 18):This statement checks if the value of the variable "age" is not equal to 18.
While this condition would evaluate to true for ages other than 18, it does not specifically cater to the requirement of being 18 or older to vote.
For more questions on Boolean condition
https://brainly.com/question/26041371
#SPJ8
Categorical variables are present in nearly every dataset, but they are especially prominent in survey data. In this chapter, you will learn how to create and customize categorical plots such as box plots, bar plots, count plots, and point plots. Along the way, you will explore survey data from young people about their interests, students about their study habits, and adult men about their feelings about masculinity. This is the Summary of lecture "Introduction to Data Visualization with Seaborn", via datacamp.
Categorical plots are useful for visualizing survey data, such as box plots, bar plots, count plots, and point plots. This chapter will teach how to create and customize these plots, to better understand survey responses from young people, students, and adult men.
Categorical plots are an important tool for visualizing survey data. They allow us to compare responses across different categories, helping to uncover patterns and trends in the data. You will learn how to design and modify categorical plots, including box plots, bar plots, count plots, and point plots, in this chapter. You will also look at survey information on students' study habits, males in their 20s and 30s, and young people's attitudes towards masculinity. Each plot type offers benefits that help you analyse the data and discover insights. Bar plots are useful for showing the relative frequency of replies, whereas box plots can be used to compare the distributions of responses for various categories. The responses from various categories can be compared using count graphs and point plots.
Learn more about data here-
brainly.com/question/11941925
#SPJ4
How do you think productivity software like Microsoft Office might be useful in the healthcare field?
Microsoft Office offers several applications that are widely used in the healthcare field. Here are some of the common uses of Microsoft Office in healthcare:
Microsoft Word: It is extensively used in healthcare for creating and formatting documents such as patient reports, medical records, and referral letters.Microsoft Excel: It is used for data analysis, tracking patient records, managing inventory, financial calculations, and creating charts or graphs for a visual representation of data.Microsoft PowerPoint: PowerPoint is commonly used in healthcare for creating presentations, training materials, educational content, and reports.Learn more about Microsoft Office, here:
https://brainly.com/question/15131211
#SPJ1
the volume and speed with which information is generated and made available is___
The volume and speed with which information is generated and made available are rapidly increasing due to technological advancements and widespread internet access.
Volume and speed are two important concepts that are often used in various fields such as physics, engineering, and business.
Volume refers to the amount of space that an object or substance occupies. It is typically measured in units such as liters or cubic meters. In business, volume can refer to the quantity of goods or services sold or produced within a specific period of time.
Speed, on the other hand, refers to how quickly an object or person moves over a given distance. It is typically measured in units such as kilometers per hour or meters per second. In business, speed can refer to how quickly a task or process is completed or how fast a company can respond to changes in the market.
Find out more about volume and speed
brainly.com/question/31234586
#SPJ11
Please help me, I need to turn this in before 12am. :(
Take a few moments and ask yourself about the value of a database. Then develop no less than two paragraphs considering... What can they really accomplish? Can you think of any industries that are actively using them? Are they challenging to learn? (or any other information you feel is prudent to the discussion).
Databases are essential tools for storing, organizing, and managing large amounts of data, providing valuable insights and serving as a foundation for software systems across industries.
Write a short note on databases and their uses.Databases are an essential tool for storing, organizing, and managing large amounts of data. They allow for efficient retrieval and manipulation of data and can provide valuable insights for businesses and organizations.
In today's data-driven world, databases can accomplish a wide range of tasks. They can store customer information, inventory data, financial records, and more. Databases can be used for analysis and decision-making, such as identifying trends, forecasting future performance, and optimizing operations. They can also provide a foundation for applications and software systems, such as e-commerce platforms, CRM systems, and inventory management software.
Many industries actively use databases, including healthcare, finance, retail, and government. Healthcare organizations use databases to manage patient records and medical information, while financial institutions use them to manage transactions and account information. Retail companies use databases to track inventory and sales data, while government agencies use them to manage citizen records and public services.
While databases can be complex and challenging to learn, there are many resources available to help individuals and organizations develop the skills needed to use them effectively. Online courses, tutorials, and certifications are available, as well as consulting and support services from database vendors and experts. With the right training and resources, anyone can learn to use databases to their full potential.
To learn more about Databases, visit:
https://brainly.com/question/6447559
#SPJ1
in the situation above, what ict trend andy used to connect with his friends and relatives
The ICT trend that Andy can use to connect with his friends and relatives such that they can maintain face-to-face communication is video Conferencing.
What are ICT trends?ICT trends refer to those innovations that allow us to communicate and interact with people on a wide scale. There are different situations that would require a person to use ICT trends for interactions.
If Andy has family and friends abroad and wants to keep in touch with them, video conferencing would give him the desired effect.
Learn more about ICT trends here:
https://brainly.com/question/13724249
#SPJ1
A relational table must not contain a(n) _____.
Answer: A relational table must not contain a(n) duplicate row.
Explanation:
In the context of relational databases, this principle is part of the rules defined by Edgar F. Codd, the inventor of the relational model for database management. According to these rules, each row in a table should be unique and identifiable, typically by a primary key. This ensures data integrity and consistency in the database
In java Please
3.28 LAB: Name format
Many documents use a specific format for a person's name. Write a program whose input is:
firstName middleName lastName
and whose output is:
lastName, firstInitial.middleInitial.
Ex: If the input is:
Pat Silly Doe
the output is:
Doe, P.S.
If the input has the form:
firstName lastName
the output is:
lastName, firstInitial.
Ex: If the input is:
Julia Clark
the output is:
Clark, J.
Answer:
Explanation:
import java.util.Scanner;
public class NameFormat {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter a name: ");
String firstName = input.next();
String middleName = input.next();
String lastName = input.next();
if (middleName.equals("")) {
System.out.println(lastName + ", " + firstName.charAt(0) + ".");
} else {
System.out.println(lastName + ", " + firstName.charAt(0) + "." + middleName.charAt(0) + ".");
}
}
}
In this program, we use Scanner to read the input name consisting of the first name, middle name, and last name. Based on the presence or absence of the middle name, we format the output accordingly using if-else statements and string concatenation.
Make sure to save the program with the filename "NameFormat.java" and compile and run it using a Java compiler or IDE.
which benefit does the cloud provide to star-up companies without access to large funding?
Explanation:
Start-up companies can store, manage, process data and use programs through a web-based interface – something that greatly reduces costs. Data stored in the cloud can be accessed from anywhere through various devices with web connectivity, which is an advantage for small companies that don't have a huge IT budget.
Cloud provides storage access and management for files and information using a the cloud computing provider. This could help reduce the cost expended on physical content storage devices.
The cost of purchasing storage devices to habor information and data may be daunting for new startups with little capital. The cloud computing framework is a cheaper alternative, yet provides easier accessibility at all times.Hence, the cloud could in the cost expended on physical storage.
Learn more : https://brainly.com/question/22841107
Answer the following questions:
Question 4
............ in the data link layer separates a message from one source to a destination, or from other messages to other destinations, by adding a sender address and a destination address.
Group of answer choices
Transforming
Framing
Separating
Messaging
Question 5
Functions of data link control includes
Group of answer choices
framing
flow and error control
addressing
All of above
Question 6
In which of the following modes of the CLI could you configure the duplex setting for interface Fast Ethernet 0/5?
Group of answer choices
User mode
Enable mode
Global configuration mode
VLAN mode
Interface configuration mode
Question 7
It is how the receiver detects the start and end of a frame.
Group of answer choices
Error control
Flow control
Framing
None of the above
Question 8
Which of the following describes a way to disable IEEE standard autonegotiation on a 0/00 port on a Cisco switch?
Group of answer choices
Configure the negotiate disable interface subcommand
Configure the no negotiate interface subcommand
Configure the speed 00 interface subcommand
Configure the duplex half interface subcommand
Configure the duplex full interface subcommand
Configure the speed 00 and duplex full interface subcommands
Question 9
______ substitutes eight consecutive zeros with 000VB0VB.
Group of answer choices
B4B8
HDB3
B8ZS
none of the above
Question 0
In _________ transmission, we send bits one after another without start or stop bits or gaps. It is the responsibility of the receiver to group the bits.
Group of answer choices
synchronous
asynchronous
isochronous
none of the above
Question
In _______ transmission, bits are transmitted over a single wire, one at a time.
Group of answer choices
asynchronous serial
synchronous serial
parallel
(a) and (b)
Question 2
Digital data refers to information that is
Group of answer choices
Continuous
Discrete
Bits
Bytes
Question 3
Two common scrambling techniques are ________.
Group of answer choices
NRZ and RZ
AMI and NRZ
B8ZS and HDB3
Manchester and differential Manchester
Question 4
________ is the process of converting digital data to a digital signal.
Group of answer choices
Block coding
Line coding
Scrambling
None of the above
Question 5
A switch receives a frame with a destination MAC address that is currently not in the MAC table. What action does the switch perform?
Group of answer choices
It drops the frame. .
It floods the frame out of all active ports, except the origination port.
It sends out an ARP request looking for the MAC address.
It returns the frame to the sender
Question 6
The _______ layer changes bits into electromagnetic signals.
Group of answer choices
Physical
Data link
Transport
None of the above
Question 7
Serial transmission occurs in
Group of answer choices
way
2 ways
3 ways
4 ways
Question 8
What type of switch memory is used to store the configuration used by the switch when it is up and working?
Group of answer choices
RAM
ROM
Flash
NVRAM
Question 9
In what modes can you type the command show mac address-table and expect to get a response with MAC table entries? (Select Two)
Group of answer choices
User mode
Enable mode
Global configuration mode
Interface configuration mode
Question 20
Which of the following are true when comparing TCP/IP to the OSI Reference Model? (Select Two)
Group of answer choices
The TCP/IP model has seven layers while the OSI model has only four layers.
The TCP/IP model has four or five layers while the OSI model has seven layers.
The TCP/IP Application layer maps to the Application, Session, and Presentation layers of the OSI Reference Model.
he TCP/IP Application layer is virtually identical to the OSI Application layer.
Answer:
nasaan po yung tanongkkkkk
three commonly used approaches to cloud computing are public cloud computing, private cloud computing, and cloud computing. True or False ?
True- three commonly used approaches to cloud computing are public cloud computing, private cloud computing, and cloud computing.
What is community cloud computing?Why are secure network connections essential? Read more about it in our eBook on cloud computing. The Cloud is an integral component of your ICT infrastructure. Get the file and read more. Unknowledgeable Medewerkers 24/7 Internet Security Glassvezel Network Dekkend. One or more community-based organizations, a third party, or a combination of them own, manage, and run it. As an illustration, our Indian government agency might share computing resources in the cloud to manage data. An example of a private cloud is a community cloud, which provides specialized infrastructure for businesses from a particular community with shared concerns about things like security, compliance, jurisdiction, etc. When it comes to cost-effectiveness, privacy, and security, it is the perfect answer.
To know more about cloud computing visit?
https://brainly.com/question/29617599
#SPJ1
9. In a 208-volt Y-connected system, what is the voltage drop between any phase wire and the grounded
neutral center tap of the windings?
A. 262 VAC
B. 180 VAC
C. 120 VAC
D. 240 VAC
How many discussion posts must you complete to meet the Expectations of the replies category
Answer:
I want to take this time to discuss a few expectations and helpful information about how to participate in the weekly online discussions. You can scroll down the page or use the links here to navigate to each section. All Discussions can be found by clicking on the Discussions link located on the left-hand side of the course.
Explanation:
Participation in the discussion forums is critical for maximizing student learning in this course, both because your participation is graded and because it's a chance to engage in a dialogue about course material. In this course, students are required to be a part of an online community of learners who collectively interact, through discussion, to enhance and support the professional performance of each other. Part of the assessment criteria for the course includes evaluating the quality and quantity of your participation in the discussion forum.
The TAS will facilitate student discussions, although they likely will not address every single post. In most cases, they might share a related idea, intervene when the discussion goes off-track, or tie student comments together to help deepen student learning. Remember, if you have a specific question, pose
A Quicksort (or Partition Exchange Sort) divides the data into 2 partitions separated by a pivot. The first partition contains all the items which are smaller than the pivot. The remaining items are in the other partition. You will write four versions of Quicksort:
• Select the first item of the partition as the pivot. Treat partitions of size one and two as stopping cases.
• Same pivot selection. For a partition of size 100 or less, use an insertion sort to finish.
• Same pivot selection. For a partition of size 50 or less, use an insertion sort to finish.
• Select the median-of-three as the pivot. Treat partitions of size one and two as stopping cases.
As time permits consider examining additional, alternate methods of selecting the pivot for Quicksort.
Merge Sort is a useful sort to know if you are doing External Sorting. The need for this will increase as data sizes increase. The traditional Merge Sort requires double space. To eliminate this issue, you are to implement Natural Merge using a linked implementation. In your analysis be sure to compare to the effect of using a straight Merge Sort instead.
Create input files of four sizes: 50, 1000, 2000, 5000 and 10000 integers. For each size file make 3 versions. On the first use a randomly ordered data set. On the second use the integers in reverse order. On the third use the
integers in normal ascending order. (You may use a random number generator to create the randomly ordered file, but it is important to limit the duplicates to <1%. Alternatively, you may write a shuffle function to randomize one of your ordered files.) This means you have an input set of 15 files plus whatever you deem necessary and reasonable. Files are available in the Blackboard shell, if you want to copy them. Your data should be formatted so that each number is on a separate line with no leading blanks. There should be no blank lines in the file. Even though you are limiting the occurrence of duplicates, your sorts must be able to handle duplicate data.
Each sort must be run against all the input files. With five sorts and 15 input sets, you will have 75 required runs.
The size 50 files are for the purpose of showing the sorting is correct. Your code needs to print out the comparisons and exchanges (see below) and the sorted values. You must submit the input and output files for all orders of size 50, for all sorts. There should be 15 output files here.
The larger sizes of input are used to demonstrate the asymptotic cost. To demonstrate the asymptotic cost you will need to count comparisons and exchanges for each sort. For these files at the end of each run you need to print the number of comparisons and the number of exchanges but not the sorted data. It is to your advantage to add larger files or additional random files to the input - perhaps with 15-20% duplicates. You may find it interesting to time the runs, but this should be in addition to counting comparisons and exchanges.
Turn in an analysis comparing the two sorts and their performance. Be sure to comment on the relative numbers of exchanges and comparison in the various runs, the effect of the order of the data, the effect of different size files, the effect of different partition sizes and pivot selection methods for Quicksort, and the effect of using a Natural Merge Sort. Which factor has the most effect on the efficiency? Be sure to consider both time and space efficiency. Be sure to justify your data structures. Your analysis must include a table of the comparisons and exchanges observed and a graph of the asymptotic costs that you observed compared to the theoretical cost. Be sure to justify your choice of iteration versus recursion. Consider how your code would have differed if you had made the other choice.
The necessary conditions and procedures needed to accomplish this assignment is given below. Quicksort is an algorithm used to sort data in a fast and efficient manner.
What is the Quicksort?Some rules to follow in the above work are:
A)Choose the initial element of the partition as the pivot.
b) Utilize the same method to select the pivot, but switch to insertion sort as the concluding step for partitions that contain 100 or fewer elements.
Lastly, Utilize the same method of pivot selection, but choose insertion sort for partitions that are of a size equal to or lesser than 50 in order to accomplish the task.
Learn more about Quicksort from
https://brainly.com/question/29981648
#SPJ1
Agriscience in the United States?
Answer:
The history of agriculture in the United States covers the period from the first English settlers to the present day. In Colonial America, agriculture was the primary livelihood for 90% of the population, and most towns were shipping points for the export of agricultural products. Most farms were geared toward subsistence production for family use. The rapid growth of population and the expansion of the frontier opened up large numbers of new farms, and clearing the land was a major preoccupation of farmers. After 1800, cotton became the chief crop in southern plantations, and the chief American export. After 1840, industrialization and urbanization opened up lucrative domestic markets. The number of farms grew from 1.4 million in 1850, to 4.0 million in 1880, and 6.4 million in 1910; then started to fall, dropping to 5.6 million in 1950 and 2.2 million in 2008
Explanation:
Hello.
So I have been using this online therapist bot named Dr. Sbaitso, but recently his program has been very slow. Are there any alternatives for online therapists? I don't feel comfortable with video calling therapists or having a meeting with them, so that's why I am looking for a bot therapist thats free.
Answer:
:P
Explanation:
❤*: .。. o(≧▽≦)o .。.:*❤
A group of 8 bits of information produces a ____.
Answer: Byte
Explanation: Eight bits constitute a byte.
I want to use an external keyboard but my father is not allowing what should I do Can someone help me out with this I know this not related to subjects but i hope you all will answer
Answer:
payattention in class
Explanation: