Write a function to solve a system of linear equations of the form Ax= b using the iterative Gauss-Seidel method. You are free to use any basic MATLAB operation to implement the algorithm (i.e. you may use any combination of loops, indexing, math, etc.), but avoid “built-in” solution methods — you would not be allowed to use the GaussSeidel function if such a function existed. The function must also test for a number of possible issues. If an issue is encountered, you should use the error() command to issue a reasonable error message. Use distinct error messages for each of the following cases: • If the dimensions of the input matrices do not conform with each other • If the matrix of coefficients is not square
In: Computer Science
Implement function get_contact(contacts, name) that returns a string. The contacts and the name parameter are both type string. This function checks for the name string in the contacts string and returns that person’s contact information. If the person is not found, the function returns, “name not in contact”. Assume input is always valid. Assume the same name is not repeated in contacts.
[You may use split(), range(), len() ONLY and no other built-in function or method]
Examples:
contacts = “Frank 703-222-2222 Sue 703-111-1111 Jane 703-333-3333”
name = “Sue”
print(get_contact(contacts, name))
returns:
703-111-1111
name = “Sam”
print(get_contact(contacts, name))
returns:
name not in contact
In: Computer Science
Python Practice Sample:
Write code to replace every occurrence of THE or the with ### and every word ending with the letter s to end with a $. Print the resulting text four words per line (and any remaining words from each paragraph on the last one of each paragraph)
"The modern business world goes way beyond the balance sheet. Whether your passion is finance or fashion, economics or the environment, you need an education built for business. At Bentley, we understand this. Sure, we started as an accounting school. But over the past 100 years, the business world has changed and we have too. Today, your classmates are dreaming of Silicon Valley or Washington D.C., just as often as Wall Street"
In: Computer Science
C++: Write a reverse function that receives a reference to a integer linked list and reverses the order of all the elements in it. For example, if the input linked list is 1 -> 4-> 2-> 3-> 6-> 5}, after processing by this function, the linked list should become 5-> 6-> 3-> 2-> 4-> 1. You need to write a main file to insert elements into the linked list and call the reverseLinkedList() function which takes the reference of first node of linked list and returns the reference of first node, after reversing the linked list. [User Input is not necessary]. Note: Do not use built in library function for linked list. You need to define your own linked list.
In: Computer Science
Implement function get_contact(contacts, name) that returns a string. The contacts and the name parameter are both type string. This function checks for the name string in the contacts string and returns that person’s contact information. If the person is not found, the function returns, “name not in contact”. Assume input is always valid. Assume the same name is not repeated in contacts.
[You may use split(), range(), len() ONLY and no other built-in function or method]
Examples:
contacts = “Frank 703-222-2222 Sue 703-111-1111 Jane 703-333-3333”
name = “Sue”
print(get_contact(contacts, name))
returns:
703-111-1111
name = “Sam”
print(get_contact(contacts, name))
returns:
name not in contact
In: Computer Science
A common argument from contrarians of the human impact on global warming about the increase in CO2 levels of the atmosphere is that the increase in carbon dioxide by humans is only a small percentage of the total sources of emitted CO2. In other words, the argument is that humans cannot be the cause of the increase in warming of the climate since the added emissions is a small percentage of what is added to the atmosphere from natural forces like volcanoes. In your response, address the following: What are the natural carbon sources and sinks? How does the emission of carbon by humans affect this balance? Why is this argument short-sighted of the feedback mechanisms built into our ecosystem? How would you explain to this contrarian that his argument is missing a larger picture?
In: Physics
Write a program that performs the following two tasks:
Use the algorithms described in class/ lecture notes. Use linked lists to implement the Queue and Stack ADTs. Using Java built-in classes will result in 0 points. You must use your own Stack and Queue classes (my code is a good starting point). Submit the code + example runs to validate your code. Submit UML chart to show the program design.
TO ANSWERER: Please give a clear, complete, and detailed program in Java. Thank you!
In: Computer Science
In: Computer Science
In: Accounting
No Hand drawings, please.
Consider the following scenario and then answer the corresponding questions.
ABC Travel and Tourism specializes in providing tourist packages to customers across the globe and the company has decided to develop an in-house software system that will help customers search for travel destinations based on popularity, budget, visa restrictions, government policies and attractive climatic conditions. Customers will also be able to book their air tickets, hotel and transportation (rental car, public transportation, cab services) through this system. Prior to the booking, the system will allow users to check for their visa eligibility to travel to destinations outside of their country of citizenship. Users will also be able to review and rate destinations or hotels using the system. The company also offers pre-set packages and if a customer decides to go with a specific package, they will be asked to provide the dates for their travel. The system will find an airline reservation, hotel/ transportation choices and create an itinerary for the customer. Customers will not be allowed to customize the pre-set packages.
Once the booking is done, the system should send a notification to the users on the purchase confirmation within 2 hours. Cancellations will incur a 25% penalty, if users are “Gold” members. In all other cases, the reservations will be non-refundable. Customers can pay using their credit cards or Paypal.
Upon your review complete the following:
|
Table Name |
Field Name |
Description |
Data Type |
Comments (Identify as primary key, foreign key or any special considerations) |
(Please see normalization examples from the lecture notes and show the normalization process for the tables as applicable)
In: Computer Science