in c++ please follow instructions and fix the errors and please make a comment next to each code error you fix.
#include "std_lib_facilities.h"
int main()
try
{
//1.
Cout << "Success!\n";
//2.
cout << "Success!\n;
//3.
cout << "Success" << !\n"
//4.
cout << success << '\n';
//5.
string res = 7; vector<int> v(10); v[5] = res; cout <<
"Success!\n";
//6.
vector<int> v(10); v(5) = 7; if (v(5)!=7) cout <<
"Success!\n";
//7.
if (cond) cout << "Success!\n"; else cout <<
"Fail!\n";
//8.
bool c = false; if (c) cout << "Success!\n"; else cout
<< "Fail!\n";
//9.
string s = "ape"; boo c = "fool"<s; if (c) cout <<
"Success!\n";
//10.
string s = "ape"; if (s=="fool") cout << "Success!\n";
//11.
string s = "ape"; if (s=="fool") cout < "Success!\n";
//12.
string s = "ape"; if (s+"fool") cout < "Success!\n";
//13.
vector<char> v(5); for (int i=0; 0<v.size(); ++i) ; cout
<< "Success!\n";
//14.
vector<char> v(5); for (int i=0; i<=v.size(); ++i) ; cout
<< "Success!\n";
//15.
string s = "Success!\n"; for (int i=0; i<6; ++i) cout <<
s[i];
//16.
if (true) then cout << "Success!\n"; else cout <<
"Fail!\n";
//17.
int x = 2000; char c = x; if (c==2000) cout <<
"Success!\n";
//18.
string s = "Success!\n"; for (int i=0; i<10; ++i) cout <<
s[i];
//19.
vector v(5); for (int i=0; i<=v.size(); ++i) ; cout <<
"Success!\n";
//20.
int i=0; int j = 9; while (i<10) ++j; if (j<i) cout <<
"Success!\n";
//21.
int x = 2; double d = 5/(x–2); if (d==2*x+0.5) cout <<
"Success!\n";
//22.
string<char> s = "Success!\n"; for (int i=0; i<=10; ++i)
cout << s[i];
//23.
int i=0; while (i<10) ++j; if (j<i) cout <<
"Success!\n";
//24.
int x = 4; double d = 5/(x–2); if (d=2*x+0.5) cout <<
"Success!\n";
//25.
cin << "Success!\n";
keep_window_open();
return 0;
}
catch (exception& e)
{
cerr << "error: " << e.what() << '\n';
keep_window_open();
return 1;
}
catch (...)
{
cerr << "Oops: unknown exception!\n";
keep_window_open();
return 2;
}
In: Computer Science
If the items in a list are floats taking 8 memory locations each, compare the amount of space required altogether if (a) the list is kept contiguously in an array 80 percent full (b) the list is kept contiguously in an array 60 percent full and (c) the list is kept as a linked list where the pointers take two memory locations each
In: Computer Science
Create a Linked List and conduct the following operations. Portion of the program is given.
The operations are:
Partial program is:
import java.util.*;
public class LinkedListDemo{
public static void main(String[] args){
LinkedList link=new LinkedList();
link.add(" "); //add something here
link.add(" "); //add something here
link.add(new Integer( )); //add something here
System.out.println("The contents of array is" + link);
System.out.println("The size of an linkedlist is" + link.size());
//add your code
//end your code
}
}
MAKE SURE TO ATTACH THE SCREENSHOT OF THE RUNNING RESULT
In: Computer Science
hi i need a code that will give me this output,
For the multiply_list, the user will be asked to input the length of the list, then to input each element of the list.
For the repeat_tuple, the user is only asked to enter the repetition factor, but not the tuple. Your program should take the list created before and convert it to a tuple.
output expected: (**user input**)
******Create your List ******
Enter length of your list: 3
****** Start filling your List ******
Enter element 1: 2
Enter element 2: 3
Enter element 3: 4
Result of list multiplication: 24
*** Create a tuple and repeat it
Enter your repetition factor: 2
Repeated Tuple: (2, 3, 4, 2, 3, 4)
this is what i have so far:
print("\n********* Create Your List ********")
len_list = int(input("Enter length of your list: "))
print("\n********* Start filling your list ********")
if len_list > 0:
element = int(input("Enter element {0}: ".format(len_list)))
In: Computer Science
Write a Python program that calls a function to sum all the numbers in a list and returns the result to the caller. The main program creates a list (with hard-coded or user input) and passes the list as an argument to the function. You may not use the built-in function, sum.
The program calls a second function to multiply all the numbers in a list passed to it by main and returns the product back to the caller.
List can be created with user input or hard-coded elements.
The program calls a third function that takes the list of words (below) passed to it from main and determines which elements are palindromes without changing the original list.
['racecar', 'Python', 'mom', 'java','level', 'DNA','101101' ]
If true, the function appends the word to a new list and returns it to the caller. The main program prints the list of palindromes returned from the function. The function should not modify the original list passed to it from the main (no side effect).
A palindrome is a word, phrase, number or sequence of words that reads the same backward as forward
In: Computer Science
Develop a C++ "doubly" linked list class of your own that can hold a series of signed shorts
Develop the following functionality:
In: Computer Science
Number Analysis Program (Specific Design Specifications)
Design a Python program that asks the user to enter a series of 20 numbers. The program should store the numbers in a list then display the following data: The lowest number in the list The highest number in the list The total of the numbers in the list The average of the numbers in the list
This python program must include the following functions. Your program must use the exact names, parameter lists, and follow the function descriptions provided.
def CreateNumberList(howMany): This function will accept a parameter for how many numbers to include in a list. It will create a list containing howMany elements that are random numbers in the range 1 - 500. The function return value will be the list that contains these values.
def SortList(myList): This function will accept the list of random numbers as the parameter variable. It will first use the sort() function to sort the values in the list. Then this function will use index 0 and index len(myList) - 1 to print the smallest and largest value in the list. This function does not have a return value.
def DisplayAverage(myList): This function will accept the list of random numbers as the parameter variable. If will use a for loop to iterate through each item in the list and add each value to a sum variable. You will then calculate the average of the values and display the average as the output. This function does not have a return value.
def main(): This function will begin by asking the user how many numbers they want to generate in their list. You must include an input validation loop that will not accept a number less than 1. After the input is validated, call the CreateNumberList function and store the return value in a variable, then call the SortList and DisplayAverage functions passing your list as an argument. Call your main function to execute the program.
In: Computer Science
Convert the following code from awk to Perl: (please don't use a2p (awk to perl) command)
Here was the original problem:
Calculate the grade for each student that appears in the data file. You may calculate the grade based on total earned points, divided by total possible points. Or, for 10 points extra credit; Use the weighted totals for this course; available in the syllabus and on the course home page.
Output a list of students, their grade as a percentage and a letter grade. For simplicity; use this letter grade scale;
The following sample output has been provided as a guide. Your solution must be based on the data in the Lab03-data.csv file. No points will be awarded to solutions that are based on copy-pasting the sample output and printing it with awk.
Name Percent Letter Andrew 75.21 C Chelsey 92.21 A Shane 77.64 C Ava 79.76 C Sam 62.34 D
Here is some of the sample data from the file (Lab03-data.csv)
| Student | Catehory | Assignment | Score | Possible |
| Sam | Quiz | Q07 | 68 | 100 |
| Sam | Final | FINAL | 58 | 100 |
| Sam | Survey | WS | 5 | 5 |
| Andrew | Homework | H01 | 25 |
100 |
Here is the AWK code that needs to be converted to PERL
BEGIN{
FS = ","
print "Name\tPercent\tLetter"
a=0
}
{
if(a==0){
a+=1
}
else{
sum[$1$2] += $4
total[$1$2] += $5
students[$1]++
categories[$2]++
}
}
END{
#for(b in sum)
# percent=(sum[b]/total[b])*100
for (b in students){
Homework=(sum[b"Homework"]/total[b"Homework"])*0.10
Lab=(sum[b"Lab"]/total[b"Lab"])*.30
Final=(sum[b"Final"]/total[b"Final"])*.15
Quiz=(sum[b"Quiz"]/total[b"Quiz"])*.40
Survery=(sum[b"Survey"]/total[b"Survey"])*.05
percent=(Homework+Lab+Final+Quiz+Survery)*100
printf "%s\t%.2f\t",b,percent
if(percent>=90 && percent<=100)
print "A";
else if(percent>=80 &&
percent<90)
print "B";
else if(percent>=70 &&
percent<80)
print "C";
else if(percent>=60 &&
percent<70)
print "D";
else
print "E"
}
}
In: Computer Science
Your assignment consists of different question styles including discussion questions, reports, exercises, problem questions and spreadsheet questions. It assesses learning outcomes as listed in the assignment rationale below.
The purpose of this assignment is to continue to develop skills in costing systems with an emphasis on the role of control in managing the production of goods and services efficiently in the workplace. Each question builds on the knowledge gained through the first assignment to develop the concepts of management accounting control through costing. Each question uses realistic data and professional practices similar to that found in workplaces.
Question 1: Budget (20 marks in total)
Resort Island University is preparing its budget for the upcoming academic year. This is a specialised private university that charges fees for all degree courses. Currently, 15,000 students are enrolled on campus. However, the university is forecasting a 5 % growth in student numbers in the coming year, despite an increase in fees of $3,500 per subject. The following additional information has been gathered from an examination of the university records and conversations with university managers:
Required:
In: Finance
WRITE AN APPROPRIATE CONCLUSION TO COMPLETE THE ESSAY BELOW.
The world is currently faced with a global pandemic of the novel Coronavirus disease 2019 (Covid-19) which quickly spread to many countries of the world. Measures were enforced in each country to stop the spread of the virus. One of the measures taken was the abrupt closure of all schools which led schools to explore online teaching methods to continue learning among its students. Several categories of online teaching methods were used, chosen based on the topic, the target students, the requirements of the Ministry of Education and the demands of the users. Online learning methods can mimic actual classrooms, with required attendance at specific times, can be self-paced, or blended, and use a variety of tools to engage students and support learning. Asynchronous, Synchronous and Hybrid online learning are three categories of online teaching methods.
Asynchronous online learning is one category of an online teaching method. It is used to describe types of learning and education that do not happen in the same place or time. This is important because digital and online teaching platforms allow students to access learning materials prepared by teachers at a time convenient to them. Students and teachers can interact continuously through online forums. Examples of asynchronous learning are emails, blogs, online discussion board and game-based activities. According to Keith Bachman, “in times where small instructor-led classrooms tend to be the exception, electronic learning solutions can offer more collaboration and interaction with experts and peers, as well as a higher success rather than the live alternative”.
Synchronous learning is another type of online teaching method. This is live online learning from various places with many learners. Here an instructor teaches virtually not physically. One of the most important advantages of synchronous learning is that it would provide a better classroom environment because of the variety of media used for the personal contact. Since students of this age are very tech savvy it becomes very easy for them to adopt to the classes using their own devices. Secondly, it helps the students learn at their own pace, time and distance is also not an issue. This would mean that time and space are overcome with the help of technology. Thirdly, they also have a variety of materials which would suit the learning style and speed of the learners. However, the disadvantage is that there is a rigid schedule which one cannot break or miss. This would make people more stressed if it is accompanied by technical difficulties. Nevertheless, synchronous learning has changed the face of learning amidst the pandemic.
Finally, another class of the online teaching method involves hybrid online learning. Hybrid online course includes a combination of the asynchronous and synchronous learning systems. The goal of the hybrid teaching method is to combine the best elements of online teaching and teaching traditionally to give the best experience of learning. Students would be required to meet face to face and have classes online, due to the CoronaVirus disease persons will be assigned by the Lecturer to meet in small groups and a face to face class will be given on a specific day. According to PennState, research and effective practice has shown that this teaching method gives students the opportunity to learn class work before and after it was taught, leaving powerpoint presentations and providing readings online can ensure this.(PennState University, n.d)Students who don't understand what was taught in class can go back and look at previous which is a major help. This method is flexible and allows both students and teachers to balance their work, social life and other activities a lot better.
In: Psychology