Answer:
Local Area Network
Explanation:
In the Information technology it is called Local Area Network.
A ----------------has the least flexibility and is best suited for mass production. It has an arrangement of machines that process identical products in a predefined order, with automatic movement of materials between machines.
Answer:
Job order production
Explanation:
A job order production has the least flexibility and is best suited for mass production.
It also has an arrangement of machines that process identical products in a predefined order, with automatic movement of materials between machines.
brainleist please..
Answer -------> Transfer line <---------
please click on the picture look at the PICTURE for the correct answer.
A majority of the people whose information was compromised are homeless; therefore there is no easy way to contact them in order to alert them of the security breach. How should Data-Time Inc. manage this breach in security
Incomplete question. Here's the full question:
Data-Time Inc. is a company that manages databases for a large city in Colorado. Included in these databases is information collected from the city’s homeless shelters and free clinics. Specifically, the databases contain personal information of the users of these services over the past 10 years; this includes people’s Social Security numbers and health records.
This data is highly secure and only accessible to the employees of Data-Time Inc. Employees are given a laptop when they are hired which allows them to access the database remotely. Unfortunately, one of these laptops is stolen and the security of the database is compromised.
A majority of the people whose information was compromised are homeless; therefore there is no easy way to contact them in order to alert them of the security breach. How should Data-Time Inc. manage this breach in security?
Explanation:
Since the emphasis is not on reversing the breach that has occurred, but on managing the level of security damage that could occur, it is important measures are directed towards preventing unauthorized access to sensitive information.
For example, the Media Access Control Address (MAC address) of the laptop if known could be greylisted from accessing the server that contains the sensitive information.
2. Which tab is used to edit objects on the Slide Master and layouts?
A. View
B. Insert
C. Shape format
D. Design
Answer is not A. View
It’s B. Insert
Answer:
it is....insert tab..B
Explanation:
insert tab includes editing options
Declare an ArrayList of Strings. Add eight names to the collection. Output the Strings onto the console using the enhanced for loop. Sort the ArrayList using the method Collections.sort. Output the sorted List. Shuffle the list, and output the shuffled list. Note that Collections (with an s) is a class, while Collection is an interface. The Collections class has many useful static methods for processing interfaces, including the sort method. Search for a name in the list that exists; output the location where it was found. Search for a name that is not in the list. What location is reported? Convert the list to an array using toArray. Output the elements of the array. Convert the array back into a list using asList. Output the elements of the list.
Answer:
---------------------------
Explanation:
Answer to this problem
Answer:
hi..,.................................................
Write a removeDuplicates() method for the LinkedList class we saw in lecture. The method will remove all duplicate elements from the LinkedList by removing the second and subsequent elements. If there is only one copy of an element, it is not removed. The list size should shrink accordingly based on the number of duplicates removed.
Answer:
removeDuplicates() function:-
//removeDuplicates() function removes duplicate elements form linked list.
void removeDuplicates() {
//declare 3 ListNode pointers ptr1,ptr2 and duplicate.
//initially, all points to null.
ListNode ptr1 = null, ptr2 = null, duplicate = null;
//make ptr1 equals to head.
ptr1 = head;
//run while loop till ptr1 points to second last node.
//pick elements one by one..
while (ptr1 != null && ptr1.next != null)
{
// make ptr2 equals to ptr1.
//or make ptr2 points to same node as ptr1.
ptr2 = ptr1;
//run second while loop to compare all elements with above selected element(ptr1->val).
while (ptr2.next != null)
{
//if element pointed by ptr1 is same as element pointed by ptr2.next.
//Then, we have found duplicate element.
//Now , we have to remove this duplicate element.
if (ptr1.val == ptr2.next.val)
{
//make duplicate pointer points to node where ptr2.next points(duplicate node).
duplicate = ptr2.next;
//change links to remove duplicate node from linked list.
//make ptr2.next points to duplicate.next.
ptr2.next = duplicate.next;
}
//if element pointed by ptr1 is different from element pointed by ptr2.next.
//then it is not duplicate element.
//So, move ptr2 = ptr2.next.
else
{
ptr2 = ptr2.next;
}
}
//move ptr1 = ptr1.next, after check duplicate elements for first node.
//Now, we check duplicacy for second node and so on.
//so, move ptr1 by one node.
ptr1 = ptr1.next;
}
}
Explanation:
Complete Code:-
//Create Linked List Class.
class LinkedList {
//Create head pointer.
static ListNode head;
//define structure of ListNode.
//it has int val(data) and pointer to ListNode i.e, next.
static class ListNode {
int val;
ListNode next;
//constructor to create and initialize a node.
ListNode(int d) {
val = d;
next = null;
}
}
//removeDuplicates() function removes duplicate elements form linked list.
void removeDuplicates() {
//declare 3 ListNode pointers ptr1,ptr2 and duplicate.
//initially, all points to null.
ListNode ptr1 = null, ptr2 = null, duplicate = null;
//make ptr1 equals to head.
ptr1 = head;
//run while loop till ptr1 points to second last node.
//pick elements one by one..
while (ptr1 != null && ptr1.next != null)
{
// make ptr2 equals to ptr1.
//or make ptr2 points to same node as ptr1.
ptr2 = ptr1;
//run second while loop to compare all elements with above selected element(ptr1->val).
while (ptr2.next != null)
{
//if element pointed by ptr1 is same as element pointed by ptr2.next.
//Then, we have found duplicate element.
//Now , we have to remove this duplicate element.
if (ptr1.val == ptr2.next.val)
{
//make duplicate pointer points to node where ptr2.next points(duplicate node).
duplicate = ptr2.next;
//change links to remove duplicate node from linked list.
//make ptr2.next points to duplicate.next.
ptr2.next = duplicate.next;
}
//if element pointed by ptr1 is different from element pointed by ptr2.next.
//then it is not duplicate element.
//So, move ptr2 = ptr2.next.
else
{
ptr2 = ptr2.next;
}
}
//move ptr1 = ptr1.next, after check duplicate elements for first node.
//Now, we check duplicacy for second node and so on.
//so, move ptr1 by one node.
ptr1 = ptr1.next;
}
}
//display() function prints linked list.
void display(ListNode node)
{
//run while loop till last node.
while (node != null)
{
//print node value of current node.
System.out.print(node.val + " ");
//move node pointer by one node.
node = node.next;
}
}
public static void main(String[] args) {
//Create object of Linked List class.
LinkedList list = new LinkedList();
//first we create nodes and connect them to form a linked list.
//Create Linked List 1-> 2-> 3-> 2-> 4-> 2-> 5-> 2.
//Create a Node having node data = 1 and assign head pointer to it.
//As head is listNode of static type. so, we call head pointer using class Name instead of object name.
LinkedList.head = new ListNode(1);
//Create a Node having node data = 2 and assign head.next to it.
LinkedList.head.next = new ListNode(2);
LinkedList.head.next.next = new ListNode(3);
LinkedList.head.next.next.next = new ListNode(2);
LinkedList.head.next.next.next.next = new ListNode(4);
LinkedList.head.next.next.next.next.next = new ListNode(2);
LinkedList.head.next.next.next.next.next.next = new ListNode(5);
LinkedList.head.next.next.next.next.next.next.next = new ListNode(2);
//display linked list before Removing duplicates.
System.out.println("Linked List before removing duplicates : ");
list.display(head);
//call removeDuplicates() function to remove duplicates from linked list.
list.removeDuplicates();
System.out.println("")
//display linked list after Removing duplicates.
System.out.println("Linked List after removing duplicates : ");
list.display(head);
}
}
Output:-
Illustrate why Sally's slide meets or does not meet professional expectations?
Describe all the things Sally can improve on one of her slides?
Suggest some ways Sally can learn more PowerPoint skills.
The correct answer to this open question is the following.
Unfortunately, you did not provide any context or background about the situation of Sally and the problem with her slides. We do not know it, just you.
However, trying to be of help, we can comment on the following general terms.
When someone does not meet professional expectations, this means that this individual did not prepare her presentation, lacked technical skills, did not included proper sources, or missed the proper visual aids to make the presentation more attractive and dynamic.
What Sally can improve about her slides is the following.
She can design a better structure for the presentation to have more congruence.
Sally has to clearly establish the goal or goals for her presentation.
She has to add many visuals instead of plain text. This way she can better capture the interest of her audience.
If she can use more vivid colors instead of pale or dark ones, that would be best.
No paragraphs unless necessary. She better uses bullet points.
Take care of the tone of her voice. During her practice, she can record her vice to check how it sounds.
List and explain the type of networking
Answer:
Used for everything from accessing the internet or printing a document to downloading an attachment from an email, networks are the backbone of business today. They can refer to a small handful of devices within a single room to millions of devices spread across the entire globe, and can be defined based on purpose and/or size.
We put together this handy reference guide to explain the types of networks in use today, and what they’re used for.
11 Types of Networks in Use Today
1. Personal Area Network (PAN)
The smallest and most basic type of network, a PAN is made up of a wireless modem, a computer or two, phones, printers, tablets, etc., and revolves around one person in one building. These types of networks are typically found in small offices or residences, and are managed by one person or organization from a single device.
2. Local Area Network (LAN)
We’re confident that you’ve heard of these types of networks before – LANs are the most frequently discussed networks, one of the most common, one of the most original and one of the simplest types of networks. LANs connect groups of computers and low-voltage devices together across short distances (within a building or between a group of two or three buildings in close proximity to each other) to share information and resources. Enterprises typically manage and maintain LANs.
Using routers, LANs can connect to wide area networks (WANs, explained below) to rapidly and safely transfer data.
3. Wireless Local Area Network (WLAN)
Functioning like a LAN, WLANs make use of wireless network technology, such as Wi-Fi. Typically seen in the same types of applications as LANs, these types of networks don’t require that devices rely on physical cables to connect to the network.
4. Campus Area Network (CAN)
Larger than LANs, but smaller than metropolitan area networks (MANs, explained below), these types of networks are typically seen in universities, large K-12 school districts or small businesses. They can be spread across several buildings that are fairly close to each other so users can share resources.
5. Metropolitan Area Network (MAN)
These types of networks are larger than LANs but smaller than WANs – and incorporate elements from both types of networks. MANs span an entire geographic area (typically a town or city, but sometimes a campus). Ownership and maintenance is handled by either a single person or company (a local council, a large company, etc.).
6. Wide Area Network (WAN)
Slightly more complex than a LAN, a WAN connects computers together across longer physical distances. This allows computers and low-voltage devices to be remotely connected to each other over one large network to communicate even when they’re miles apart.
The Internet is the most basic example of a WAN, connecting all computers together around the world. Because of a WAN’s vast reach, it is typically owned and maintained by multiple administrators or the public.
7. Storage-Area Network (SAN)
As a dedicated high-speed network that connects shared pools of storage devices to several servers, these types of networks don’t rely on a LAN or WAN. Instead, they move storage resources away from the network and place them into their own high-performance network. SANs can be accessed in the same fashion as a drive attached to a server. Types of storage-area networks include converged, virtual and unified SANs.
8. System-Area Network (also known as SAN)
This term is fairly new within the past two decades. It is used to explain a relatively local network that is designed to provide high-speed connection in server-to-server applications (cluster environments), storage area networks (called “SANs” as well) and processor-to-processor applications. The computers connected on a SAN operate as a single system at very high speeds.
9. Passive Optical Local Area Network (POLAN)
As an alternative to traditional switch-based Ethernet LANs, POLAN technology can be integrated into structured cabling to overcome concerns about supporting traditional Ethernet protocols and network applications such as PoE (Power over Ethernet). A point-to-multipoint LAN architecture, POLAN uses optical splitters to split an optical signal from one strand of singlemode optical fiber into multiple signals to serve users and devices.
10. Enterprise Private Network (EPN)
These types of networks are built and owned by businesses that want to securely connect its various locations to share computer resources.
11. Virtual Private Network (VPN)
By extending a private network across the Internet, a VPN lets its users send and receive data as if their devices were connected to the private network – even if they’re not. Through a virtual point-to-point connection, users can access a private network remotely.
Functions IN C LANGUAGE
Problem 1
Function floor may be used to round a number to a specific decimal place. The statement
y = floor( x * 10 + .5 ) / 10;
rounds x to the tenths position (the first position to the right of the decimal point). The
statement
y = floor( x * 100 + .5 ) / 100;
rounds x to the hundredths position (the second position to the right of the decimal
point).
Write a program that defines four functions to round a number x in various ways
a. roundToInteger( number )
b. roundToTenths( number )
c. roundToHundreths( number )
d. roundToThousandths( number )
For each value read, your program should print the original value, the number rounded to
the nearest integer, the number rounded to the nearest tenth, the number rounded to
the nearest hundredth, and the number rounded to the nearest thousandth.
Input Format
Input line contain a float number.
Output Format
Print the original value, the number rounded to the nearest integer, the number rounded
to the nearest tenth, the number rounded to the nearest hundredth, and the number
rounded to the nearest thousandth
Examples
Example 1
Input 1
24567.8
Output 1
24567.8 24568 24570 24600
Which devices are managed through device management?
Device management is the process of managing
________devices.
Answer:
organization
Explanation:
The answer is organization I am thinking.
Write a method 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 and decare/use loop variable. Example output for numCycles = 2:
1: Lather and rinse.
2: Lather and rinse.
Done.
import java.util.Scanner; 3 public class ShampooBottle 4 5 Your solution goes here / 7 public static void main (String [] args) ShampooBottle trialSize - new ShampooBottle); trialsize.printShampooInstructions (2) 10 Run View your last submission Your solution goes here / public void printShampooInstructions (int numCycles) f if (numCycles 1) System.out.printin("Too few.") else if (numCycles4) System.out.printin("Too many.") else System.out.println("Done."); for (int i = 1; i (z numCycles ; ++i){ System.out . printin (? + ": Lather and rinse.");
Answer:
if (numCycles < 1){
System.out.println("Too few.");
}
else if (numCycles > 4){
System.out.println("Too many.");
}
else{
for(int i = 1; i <= numCycles; i++)
{
System.out.println(i + ": Lather and rinse.");
}
System.out.println("Done.");
}
Explanation:
The DevOps team is requesting read/write access to a storage bucket in the public cloud that is located in a backup region. What kind of services are they requesting
Answer:
Authorization
Explanation:
The kind of service that they are requesting is known as Authorization. This is basically when a user, such as the DevOps team in this scenario, is requesting permission to access a certain service or function that is locked. In this scenario, the services being requested are the read/write access which would allow the DevOps team to manipulate the data in the storage bucket. This is usually locked because the data is sensitive and innapropriate changes can cause many errors in the system. Therefore, authorization is needed to make sure that only specific users have access.
what is Microsoft word
Answer:
A software where you can document letters, essays or anything really.
Explanation:
The__________is an HTML tag that provides information on the keywords that represent the contents of a Web page.
Answer:
Meta tag
Explanation:
write a script to check command arguments. Display the argument one by one (use a for loop). If there is no argument provided, remind users about the mistake.
Answer and Explanation:
Using Javascript programming language, to write this script we define a function that checks for empty variables with if...else statements and then uses a for loop to loop through all arguments passed to the function's parameters and print them out to the console.
function Check_Arguments(a,b,c){
var ourArguments= [];
if(a){
ourArguments.push(a);}
else( console.log("no argument for a"); )
if(b){
ourArguments.push(b);}
else( console.log("no argument for b"); )
if(c){
ourArguments.push(c);}
else( console.log("no argument for c"); )
for(var i=0; i<ourArguments.length; i++){
Console.log(ourArguments[i]);
}
}
How many ways are there to arrange the letters in the word ALGORITHMS? Note, the letter arrangement does not have to spell a word in the dictionary, but the new word must contain all the letters and each letter can be used only once.
there are ten letters in the word, so for the first position we can choose out of 10 option.
no matter wich specific option we choose, we will have 9 letters left for the 2nd letter.
and 8 for the third place.
...
when we will have used up 9 of 10 letters, there will be only one option for the last place.
the number of possible decision-paths is therefore given by this expression:
10*9*8*7*6*5*4*3*2*1
wich is 3,628,800
there are quite a few ways to rearrange 10 letters
The sorting method which commands entries in a going to head predicated on each character without regard to space as well as punctuation, therefore there are 3628800 ways.
The word 'ALGORITHMS' has 10 letters. There is no repeated letter so, the first Letter can hold 10 places if we start taking one letter at a time. The second can then hold nine positions, the third can hold eight, and so on.So, as [tex]\bold{ 10\times 9 \times 8.... \times 3 \times 2 \times 1 = 362,8800}[/tex] ways, we have such a total number of ways.
Learn more:
brainly.com/question/17276660
Ranges of up addresses that anyone can use for their internal networks are known as
write a program that assigns values to
three variables, assigns the sum (adds
the three values to a variable called
total and prints total.
Explanation:
10:A program that assigns the sum 20,30,40
20: input 20,30,40
30:sum input
40: print total
End
You have a shared folder named Reports. Members of the Managers group have been given Write access to the shared folder. Mark Mangum is a member of the Managers group. He needs access to the files in the Reports folder, but he should not have any access to the Confidential.xls file. What should you do
Answer:
Following are the solution to the given question:
Explanation:
The common folder called Report has also been shared. Writing access to a shared folder was given to management group members. Mark is a member of a group of managers. We can access the files within your reporting directory, but you really should not access the Confidential.xls file. We want to add Mark Mangum to our ACL files using Deny permissions on Confidential.xls.
In confirmatory visualization Group of answer choices Users expect to see a certain pattern in the data Users confirm the quality of data visualization Users don't know what they are looking for Users typically look for anomaly in the data
Answer: Users expect to see a certain pattern in the data
Explanation:
Confirmatory Data Analysis occurs when the evidence is being evaluated through the use of traditional statistical tools like confidence, significance, and inference.
In this case, there's an hypothesis and the aim is to determine if the hypothesis is true. In this case, we want to know if a particular pattern on the data visualization conforms to what we have.
Which control program flow options runs to the end of the code block and resumes the break mode at the statement that follows?
Answer:
Step Out
Explanation:
In the field of computer science, the control flow or the flow of control is defined as the order where the individual statements, [tex]\text{function calls}[/tex] or instructions of a program are [tex]\text{evaluated or executed. }[/tex]
The Step Out control flow program runs to the [tex]\text{end of the code block}[/tex] and it resumes the [tex]\text{break mode}[/tex] at the statement that it follows.
Which attack form either exploits a software flaw or floods a system with traffic in order to prevent legitimate activities or transactions from occurring?
Answer:
Denial of service attack.
Explanation:
In Cybersecurity, vulnerability can be defined as any weakness, flaw or defect found in a software application or network and are exploitable by an attacker or hacker to gain an unauthorized access or privileges to sensitive data in a computer system.
This ultimately implies that, vulnerability in a network avail attackers or any threat agent the opportunity to leverage on the flaws, errors, weaknesses or defects found in order to compromise the security of the network.
Data theft can be defined as a cyber attack which typically involves an unauthorized access to a user's data with the sole intention to use for fraudulent purposes or illegal operations. There are several methods used by cyber criminals or hackers to obtain user data and these includes DDOS attack, SQL injection, man in the middle, phishing, sniffing, DOS attack, etc.
A denial of service (DOS) attack is a form of cyber attack that involves either the exploitation of a software flaw or overwhelmingly floods a computer system in a network with traffic in order to prevent authorized users from performing legitimate activities or transactions.
Some of the ways to prevent vulnerability or cyber attacks in a network are;
1. Ensure you use a very strong password with complexity through the use of alphanumerics.
2. You should use a two-way authentication service.
3. You should use encrypting software applications or services.
Batter boards (if properly offset) will allow for the end user to continually re-string the layout to double check accuracy without having to continually set up an instrument True False
Answer:
The given statement is "True".
Explanation:
Batter panels seem to be platform frames that are used to temporarily suspend foundations plan threads. These same batter board members look like barriers once built.Its positioning is important for creating a foundation precisely as the plans state since some components of their development would have to be accurate. Placed correctly batter panels guarantee that the boundaries seem to be at the appropriate temperatures as well as positions.Which tools do you use for LinkedIn automation?
Automation tools allow applications, businesses, teams or organizations to automate their processes which could be deployment, execution, testing, validation and so on. Automation tools help increase the speed at which processes are being handled with the main aim of reducing human intervention.
Linkedln automation tools are designed to help automate certain processes in Linkedln such as sending broadcast messages, connection requests, page following and other processes with less or no human or manual efforts. Some of these automation tools include;
i. Sales navigator for finding right prospects thereby helping to build and establish trusting relationships with these prospects.
ii. Crystal for providing insights and information about a specified Linkedln profile.
iii. Dripify used by managers for quick onboarding of new team members, assignment of roles and rights and even management of subscription plans.
Answer:
Well, for me I personally use LinkedCamap to drive more LinkedIn connections, hundreds of leads, sales, and conversions automatically.
Some other LinkedIn automation tools are;
Expandi Meet Alfred Phantombuster WeConnect LinkedIn HelperHope this helps!
Which of the following is a benefit of a digital network?
Security is enhanced.
Multiple devices can be connected.
Users are familiar with the software.
It makes using the internet easier.
Answer:
Multiple devices can be connected
The social network created through digital technology is referred to as a "digital network." It provides phone, video, data, and other network services for digital switching and transmission.
What is Digital network?In order to align the network with business demands, it has markets, data networks, and communications networks.
Digital networks' core are networking components like switches, routers, and access points. These tools are used to link networks to other networks, secure equipment like computers and servers connected to organizational networks, and analyze data being sent across networks.
Through cloud-enabled central administration, digital networks provide end-to-end network services for on-premises and cloud space. All network components are monitored, analyzed, and managed by a central server.
Therefore, The social network created through digital technology is referred to as a "digital network." It provides phone, video, data, and other network services for digital switching and transmission.
To learn more about Technology, refer to the link:
https://brainly.com/question/9171028
#SPJ2
A small company with 100 computers has hired you to install a local area network. All fo the users perform functions like email, browsing and Office software. In addition, 25 of them also do a large number of client/server requests into a database system. Which local area network operating system would you recommend?
Answer:
Based on the requirements indicated in the question above, the best Local Area Network (LAN) operating system that can be used is
Windows 7 , 8.1 or Windows 10. This is because they all are configured to handle extensive LAN activity and can connect over 200 users.
Explanation:
Generally speaking, Windows 10 packs more improvement over the previous windows.
Cheers
Base conversion. Perform the following conversion (you must have to show the steps to get any credit.
3DF16 = ?
Base to be converted to was not included but we would assume conversion to base 10(decimal)
Answer and Explanation:
The 3DF in base 16 is a hex number so we need to convert to its equivalent binary/base 2 form:
We therefore each digit of given hex number 3DF in base 16 to equivalent binary, 4 digits each.
3 = 0011
D = 1101
F = 1111
We then arrange the binary numbers in order
3DF base 16 = 1111011111 in base 2
We then convert to base 10 =
= 1x2^9+1x2^8+1x2^7+1x2^6+0x2^5+1x2^4+1x2^3+1x2^2+1×2^1+1×2^0
= 991 in base 10
A strategy that adopts interface standards that are defined by and widely used throughout industry to facilitate the update of components with new technology is __________. Open systems Non-developmental items Software-embedded systems Automated Information Systems
Answer:
The right approach is Option d (Automated information systems).
Explanation:
A technology that collects as well as disseminates knowledge or material throughout a range or variety of computerized systems, they are determined as an Automated information system.Oftentimes virtually minimal individual personal interference is necessary except perhaps construction as well as services.Other choices aren't related to the given scenario. So the above is the appropriate one.
provides an automated method for discovering host systems on a network. Although it doesn't necessarily discover all weaknesses, it does determine which systems are active on the network and what services they offer or what ports are available
Answer:
Network scan
Explanation:
Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.
Some examples of cyber attacks are phishing, zero-day exploits, denial of service, man in the middle, cryptojacking, malware, SQL injection, spoofing etc.
Generally, a security assessment is carried out by network security experts on a regular basis to determine potential loopholes or vulnerabilities in the information and technology (IT) infrastructure. One of the techniques or approach used in security assessment is a network scan.
A network scan is a security assessment technique used for the automatic detection of host systems on a network. Although a network scan isn't capable of discovering or detecting all the weaknesses on a network, it avails users information about the computer systems that are active on the network and what services the computer systems offer or what ports are available on them.
Write a programmer defined function that compares the ASCII sum of two strings. To compute the ASCII sum, you need to compute the ASCII value of each character of the string and sum them up. You will thus need to calculate two sums, one for each string. Then, return true if the first string has a larger ASCII sum compared to the second string, otherwise return false. In your main function, prompt the user to enter two strings with a suitable message and provide the strings to the function during function call. The user may enter multiple words for either string. Then, use the Boolean data returned by the function to inform which string has the higher ASCII sum.
Answer:
The program in Python is as follows:
def ASCIIsum(str1,str2):
asciisum1 = 0; asciisum2 = 0
for chr in str1:
asciisum1 += (ord(chr) - 96)
for chr in str2:
asciisum2 += (ord(chr) - 96)
if asciisum1 > asciisum2:
return True
else:
return False
str1 = input("Enter first string: ")
str2 = input("Enter second string: ")
if ASCIIsum(str1,str2) == True:
print(str1,"has a higher ASCII value")
else:
print(str2,"has a higher ASCII value")
Explanation:
This defines the function
def ASCIIsum(str1,str2):
This initializes the ascii sum of both strings to 0
asciisum1 = 0; asciisum2 = 0
This iterates through the characters of str1 and add up the ascii values of each character
for chr in str1:
asciisum1 += (ord(chr) - 96)
This iterates through the characters of str2 and add up the ascii values of each character
for chr in str2:
asciisum2 += (ord(chr) - 96)
This returns true if the first string has a greater ascii value
if asciisum1 > asciisum2:
return True
This returns false if the second string has a greater ascii value
else:
return False
The main begins here
This gets input for first string
str1 = input("Enter first string: ")
This gets input for second string
str2 = input("Enter second string: ")
If the returned value is True
if ASCIIsum(str1,str2) == True:
Then str1 has a greater ascii value
print(str1,"has a higher ASCII value")
If otherwise
else:
Then str2 has a greater ascii value
print(str2,"has a higher ASCII value")