Answer:
The program is as follows:
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
cout<<"Elements: ";
cin>>n;
vector <int>vectnum;
int numInp;
for (int i = 1; i <= n; i++){ cin>>numInp; vectnum.push_back(numInp); }
int big, secbig;
big = vectnum.at(0); secbig = vectnum.at(1);
if(vectnum.at(0)<vectnum.at(1)){ big = vectnum.at(1); secbig = vectnum.at(0); }
for (int i = 2; i< n ; i ++) {
if (vectnum.at(i) > big) {
secbig = big;;
big = vectnum.at(i);
}
else if (vectnum.at(i) > secbig && vectnum.at(i) != big) {
secbig = vectnum.at(i);
}
}
cout<<"Second Largest: "<<secbig<<endl;
int small, secsmall;
small = vectnum.at(1); secsmall = vectnum.at(0);
if(vectnum.at(0)<vectnum.at(1)){ small = vectnum.at(0); secsmall = vectnum.at(1); }
for(int i=0; i<n; i++) {
if(small>vectnum.at(i)) {
secsmall = small;
small = vectnum.at(i); }
else if(vectnum.at(i) < secsmall){
secsmall = vectnum.at(i); } }
cout<<"Second Smallest: "<<secsmall;
return 0;
}
Explanation:
See attachment for explanation
In this code, there's a Person class that has an attribute name, which gets set when constructing the object. Fill in the blanks so that 1) when an instance of the class is created, the attribute gets set correctly, and 2) when the greeting() method is called, the greeting states the assigned name. mtino 1-class Person: 2 - def __init__(self, name): self.name = def greeting(self): # Should return "hi, my name is " followed by the name of the Person. return Run 8 # Create a new instance with a name of your choice 9 some_person = 10 # Call the greeting method 11 print (some_person. ) 12 Press ESC to exit the code block at any time
Answer:
Explanation:
The following code is written in Python. It creates a Person class and creates the constructor which takes in the name of the person for that instance, as well as a greeting method which outputs the desired "Hi, my name is" string with the name of that person. The output of the code can be seen in the attached picture below. I have created a person object called John and called the greeting method so that you can see the output.
class Person:
name = ''
def __init__(self, name):
self.name = name
def greeting(self):
print('Hi, my name is ' + self.name)
The code containing the Person class definition and the greeting is found in the attached image
The Person class has a single instance field name that stores the name of the person.
The instance initializer, __init__, accepts an argument, name, and saves the value in the name attribute of the Person class.
The Person class also has a greeting method that is called by the main code segment. The main code segment creates a Person object, and calls it in the print function to display the greeting with the person's name.
Learn more about classes in Python here https://brainly.com/question/21065208
The length of a list can be determined through the index function
True
False
Answer:
false
Explanation:
Justin Kace is promoting the metric system and wants people to be able to convert miles to kilometers and kilometers to miles. Develop a program that asks the user for a number of miles and converts miles to kilometers (multiplying miles by 1.609), and then asks for a number of kilometers and converts kilometers to miles (multiplying kilometers by 0.6214).
Solution :
//Program heading
Display "Kilometers to [tex]$\text{Miles}$[/tex] and [tex]$\text{Miles}$[/tex] to Kilometers Conversion Program"
//Get [tex]$\text{Miles}$[/tex]
Display "Enter the [tex]$\text{miles}$[/tex]: "
Input [tex]$\text{miles}$[/tex]
//Convert [tex]$\text{miles}$[/tex] to kilometers and display result
converted_km =[tex]$\text{miles}$[/tex] x 1.609
Display "Converted kilometers = " + converted_km
//Get Kilometers
Display "Enter the kilometers: "
Input km
//Convert kilometers to [tex]$\text{miles}$[/tex] and display result
converted_[tex]$\text{miles}$[/tex] = km x 0.6214
Display "Converted [tex]$\text{miles}$[/tex] = " + converted_[tex]$\text{miles}$[/tex]
//Thank the user for using this program
Display "Thank you for using this program. Good-bye!"
Stop
Sample Output:
Kilometers to [tex]$\text{Miles}$[/tex] and [tex]$\text{Miles}$[/tex] to Kilometers Conversion Program
Enter the [tex]$\text{miles}$[/tex]: 10
Converted kilometers = 16.09
Enter the kilometers: 10
Converted [tex]$\text{miles}$[/tex] = 6.214
Thank you for using this program. Good-bye!
Declare a typedef struct named jumper_t that will have four parts: character array name that is 16 in length, double array of tries that is N_TRIES in length, double best_jump, double deviation 2. Write one line to declare an array variable, named jlist of the above struct type, with a length of ten. No initialization required.
Answer:
The typedef struct is as follows:
typedef struct jumper_t {
char name[16];
double tries[N_TRIES];
double best_jump;
double deviation;
} jumper_t;
The declaration of jlist is:
jumper_t jlist[10];
Explanation:
This defines the typedef structure
typedef struct jumper_t {
The following declares the variables as stated in the question
char name[16];
double tries[N_TRIES];
double best_jump;
double deviation;
}
This ends the typedef definition
jumper_t;
(b) The declaration of array jlist is:
jumper_t jlist[10];
User account
2. The system allows user to register and create the account
3. Users allowed by system to edit & modify the account
4. System allows users to view products
5. System allows users to comment on product
6. Perform sentiment analysis
7. Use APS to connect to product
8. Review website to collect comment of product
9. System dynamically analyze command of users
10. Matching keyword in database
11. system allots rank to product as good, bad and ugly
12. view product review
13. users can use system to view product
14. manage users account
15. all users account allowed to be added or modified , and deleted by administrator
Non Functional Requirements:
1. Efficiency
2. Interoperable
3. Portability
4. Security
Part A: Answer the following questions prefer to the previous requirements?
Question :
Three Use-Case Narrative. Choose one major use-case for each player (Customer, Shop Owner, and Administrator).
17.8.1: Writing a recursive math function. Write code to complete raise_to_power(). Note: This example is for practicing recursion; a non-recursive function, or using the built-in function math.pow(), would be more common.
Answer:
The recursion function is as follows:
def raise_to_power(num, power):
if power == 0:
return 1
elif power == 1:
return num
else:
return (num*raise_to_power(num, power-1))
Explanation:
This defines the function
def raise_to_power(num, power):
If power is 0, this returns 1
if power == 0:
return 1
If power is 1, this returns num
elif power == 1:
return num
If otherwise, it calculates the power recursively
else:
return (num*raise_to_power(num, power-1))
Create a new Java program called Flip. Write code that creates and populates an array of size 25 with random numbers between 1-50. Print the original array. Print array in reverse.
Assignment: Provide a reflection paper of 500 words minimum (2 pages double spaced) of how the knowledge, skills, or theories of Risk Management and Information Security have been applied, or could be applied, in a practical manner to your current work environment. If you are not currently working, share times when you have or could observe these theories and knowledge could be applied to an employment opportunity in your field of study.Requirements: Provide a 500 word (or 2 pages double spaced) minimum reflection. Use of proper APA formatting and citations. If supporting evidence from outside resources is used those must be properly cited. Share a personal connection that identifies specific knowledge and theories from this course. Demonstrate a connection to your current work environment. If you are not employed, demonstrate a connection to your desired work environment. You should NOT provide an overview of the assignments assigned in the course. The assignment asks that you reflect how the knowledge and skills obtained through meeting course objectives were applied or could be applied in the workplace.
Answer:
Following are the response to the given question:
Explanation:
They are already talking business to business collects in which we are calling the client for collecting whenever the products which we have purchased are overdue and overdue inside 30 days. About business criteria, we should ensure no other websites mostly on agent acting open up so that nobody can misuse it; we also have to know the correct revising and trying to run off all systems and therefore all apps are organ systems because then the critical business work time has would not get out of the way. This is about the security of information. The agents also are adequately taught in IT policy according to the demand of the company.
They soon come towards the area of risk, experience, and skill. All agents ought to have proper refresh sessions to fulfill GAP knowledge but also improve their abilities for 100 percent cent accuracy on TAT on every appeal. Your Agency's response.
There ought to be a right party connect. We must keep up with 80-20 RULE which means that we can easily acquire the bigger amount earlier than somehow investing whatever money for future production if we concentrate on TOP 20 Overdue Current Passengers.
When we add up the current sum owing as well as the amount due by both the end of the month, so we will subtract all promises that were made by the end of each month. You can readily deduce how long and how much money will be received by the end of each month, and how long this will be due by the end of each month.
The total danger which we imagine to be cash flow issues is when a company is close to collapse or even has a money problem, they are few risks that any company has.
To solve this RISK to money flow clients, we have to provide them a payment plan so that we could at the very least invest some cash in additional production. Besides offering customers a pay system, you truly cannot help.
Another key potential risk is the unrequired quantity on the accounts of the consumer. Underneath the U.S. government, it'll be a direct responsibility of the government if there is an unclear and unapplied amount which has lied to an account for even more than 4 years.
Therefore it does have to do about risk, skills, knowledge the safety of information. All above theory helps explain everything which enables the execution of operations as well as, as project manager, we have to track input and output information. we need to charge, past due, credits, debits, PD percent every week and month, seeing the company's pattern, and also transform policies as to how the trend or even the forecast can enhance.
Sam plans to use this image in artwork for a brochure about airplanes. Which principles of page layout is Sam planning to use in this artwork?
A. emphasis
B. repetition
C. balance
D. alignment
E. proximity
Answer: Alignment
Explanation:
The principle of repitition indicates that some aspect of a design are repeated. This can be in form of bullet list, lines, color etc.
Balance has to do with how the weight is distributed.
The Principle of Alignment means that the pictures on a page should be connected visually to another thing.
Principle of Proximity simoly means that the items that are related on a page should be close to each other.
Therefore, the principles of page layout that Sam is planning to use in this artwork is alignment.
Answer:
D. alignment
Explanation:
Write a class called AddThreeGame that allows two players to play a game in which they alternately choose numbers from 1-9.
Answer:
Explanation:
The following code is written in Python, it creates the AddThreeGame as requested for 2 players. Outputting the desired output after each player has chosen a number and checking for a winner after every choice. Due to technical reasons, I had to add the code as a txt file below and the output can be seen in the attached picture.
Which measurement symbol is this?
PLS HELP
Answer:
Foot.
Explanation:
Hope this helps!
which data type uses %i as a format specifier
Answer:
A decimal integer
Explanation:
Hope this helps!
Match each code snippet to its appropriate markup language name. XML CSS HTML XHTML
Answer:
Please find the complete solution in the attached file.
Explanation:
answer:
<p>line break</p><br/> : XHTML
<Address>24, North Block</Address> : XML
<P>New paragraph</P> : HTML
<h2 style=“color:red;font-size:12px;”>Heading in red color.</h2> : CSS
just truuust
1. Which of the following is a new
generation optical storage device?
CD
DVD
Blu-ray disc
Pen drive
Answer:
CD or CD Rom
fhiykkoojnddeyui
any computer and technology experts?
1. what is a file
2. what is a folder
3. what is a subfolder
4. how files are organized in folders and subfolders
5. what is a file extension
6. types of file extensions
7.the importance of file extensions
Answer:
file is the common storage unit in a computer, and all programs and data are "written" into a file and "read" from a file. A folder holds one or more files, and a folder can be empty until it is filled. A folder can also contain other folders, and there can be many levels of folders within folders.
a subfolder is an organizational folder on a computer that is located within another folder
Explanation:
sorry i dont know all
They need network security skills to know how to perform tasks such as:
A. Testing software before launching.
B. maintaining databases.
C. investigating virus attacks
Answer:
Your answer should be C
because in they will protect the data base from virus.
In theory, a hacker with a small but powerful directional antenna could access a wireless network from more than one mile away. In a real-world situation, what is the more likely range involved
How to open an image by using the command prompt? I need the explanation step by step. Please Help.
Open a file from Windows Terminal
In a command prompt window, type cd followed by the path of the file that you wish to open. After the path matches with the one in the search result. Enter the file name of the file and press Enter. It will launch the file instantly.
Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. calcPyramidVolume() calls the given calcBaseArea() method in the calculation.
Answer:
The method in C++ is as follows:
double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){
double baseArea = calcBaseArea(baseLength, baseWidth);
double volume = baseArea * pyramidHeight;
return volume;
}
Explanation:
This defines the calcPyramidVolume method
double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){
This calls the calcBaseArea method to calculate the base area of the pyramid
double baseArea = calcBaseArea(baseLength, baseWidth);
This calculates the volume
double volume = baseArea * pyramidHeight;
This returns the volume
return volume;
}
See attachment for complete program that include all methods that is required for the program to function.
Please help it’s timed
Answer:
you are proooooooooooooooooooo
Explanation:
Question # 4
Fill in the Blank
Complete the following sentence.
The first email was sent in
.
Answer:
1971
Explanation:
If there is more detail needed i'm sorry
Answer:
1971
Explanation:
#Nova
Have a great day!
:)
1. ¿Qué es un cursograma?
Answer:
Un cursograma permite representar gráficamente procedimientos administrativos. Constituyen instrumentos importantes para la visualización global y esquemática del conjunto de tareas administrativas.
What is the difference between autofocus and autocomplete
Answer:
https://www.c-sharpcorner.com/interview-question/explain-autofocus-and-autocomplete-attribute
found this on a website hope you find it useful !
Write a program to sort the (name, age, score) tuples by descending order where name is string, age and score are numbers. The sort criteria is: 1: Sort based on name 2: Then sort based on age 3: Then sort by score The priority is that name < age < score. If the following tuples are given as input to the program: [('John', '20', '91'), ('Jason', '21', '85'), ('Jony', '17', '91'), ('Johny', '17', '93'), ('Tom', '19', '80')]\
Answer:
The program in Python is as follows:
from operator import itemgetter
m = int(input("Number of records: "))
print("Name, Age, Score")
my_list =[]
for i in range(m):
user_details = input()
my_list.append(tuple((user_details.split(","))))
my_list.sort(key = itemgetter(0, 1, 2))
print("Sorted: ", my_list)
Explanation:
This imports the operator function from itemgetter
from operator import itemgetter
This gets the number of records, m
m = int(input("Number of records: "))
This prints the format of input
print("Name, Age, Score")
This initializes the list of tuples
my_list =[]
This iterates through m
for i in range(m):
This gets the details of each person
user_details = input()
This appends the details to the tuple
my_list.append(tuple((user_details.split(","))))
This sorts the tuple
my_list.sort(key = itemgetter(0, 1, 2))
This prints the sorted tuple
print("Sorted: ", my_list)
LaToya is creating a program that will teach young children to type. What keyword should be used to create a loop that will print “try again” until the correct letter is typed
a. print
b. random
c. else
d. while
LaToya is creating a program that will teach young children to type. What keyword should be used to create a loop that will print “try again” until the correct letter is typed
Answer:d. while ✓
Explanation:
The while loop is used to repeat a section of code an unknown number of times until a specific condition is met.
[tex] \\ \\ [/tex]
Hope it helps
-------☆゚.・。゚ᵴɒƙυᴚᴀ_ƨȶäᴎ❀
. Write the advantages and disadvantages of CLI?
In this lab, you complete a C++ program that swaps values stored in three int variables and determines maximum and minimum values. The C++ file provided for this lab contains the necessary variable declarations, as well as the input and output statements. You want to end up with the smallest value stored in the variable named first and the largest value stored in the variable named third. You need to write the statements that compare the values and swap them if appropriate. Comments included in the code tell you where to write your statements.InstructionsEnsure the Swap.cpp file is open in your editor.Write the statements that test the first two integers, and swap them if necessary.Write the statements that test the second and third integer, and swap them if necessary.Write the statements that test the first and second integers again, and swap them if necessary.Execute the program by clicking the "Run Code" button at the bottom of the screen using the following sets of input values.101 22 -23630 1500 921 2 2Provided code:// Swap.cpp - This program determines the minimum and maximum of three values input by// the user and performs necessary swaps.// Input: Three int values.// Output: The numbers in numerical order.#include using namespace std;int main(){ // Declare variables int first = 0; // First number int second = 0; // Second number int third = 0; // Third number int temp; // Used to swap numbers const string SENTINEL = "done"; // Named constant for sentinel value string repeat; bool notDone = true; //loop control // Get user input cout << "Enter first number: "; cin >> first; cout << "Enter second number: "; cin >> second; cout << "Enter third number: "; cin >> third; while(notDone == true){ // Test to see if the first number is greater than the second number // Test to see if the second number is greater than the third number // Test to see if the first number is greater than the second number again // Print numbers in numerical order cout << "Smallest: " << first << endl; cout << "Next smallest: " << second << endl; cout << "Largest: " << third << endl; cout << "Enter any letter to continue or done to quit: "; cin >> repeat; if (repeat == SENTINEL){ notDone = false; } else { cout << "Enter first number: "; cin >> first; cout << "Enter second number: "; cin >> second; cout << "Enter third number: "; cin >> third; } return 0;} // End of main function
Answer:
Following are the code to the given question:
#include <iostream>//header file
using namespace std;
int main()//main method
{
int first = 0,second = 0,third = 0;//defining integer variable
int temp; //defining integer variable
const string SENTINEL = "done"; // defining a string variable as constant
string repeat;// defining a string variable
bool notDone = true; //defining bool variable
cout << "Enter first number: ";//print message
cin >> first;//input value
cout << "Enter second number: ";//print message
cin >> second;//input value
cout << "Enter third number: ";//print message
cin >> third;//input value
while(notDone == true)//defining a loop to check the value
{
if(first > second)//use if to compare first and second value
{
int temp = first;//defining temp to hold first value
first = second;//holding second value in first variable
second = temp;//holding temp value in second variable
}
if(second > third)//use if to compare second and third value
{
int temp = second;//defining temp to hold second value
second = third;//holding second value in third variable
third = temp;//holding temp value in third variable
}
cout << "Smallest: " << first << endl;//print smallest value
cout << "Next smallest: " << second << endl;//print Next smallest value
cout << "Largest: " << third << endl;////print Largest value
cout << "Enter any letter to continue or done to quit: ";//print message
cin >> repeat;//holding string value
if (repeat == SENTINEL)
{
notDone = false;//holding bool value
}
else //else block
{
cout << "Enter first number: ";//print message
cin >> first;//input value
cout << "Enter second number: ";//print message
cin >> second;//input value
cout << "Enter third number: ";//print message
cin >> third;//input value
}
return 0;
}
}
Output:
Please find the attached file.
Explanation:
Inside the main method Four integer variable "first, second, third, and temp" is declared in which first three variable is used for input value and temp is used to compare value. In thew next step, two string variable "SENTINEL and repeat" is declared in which "SENTINEL" is constant and a bool variable "notDone" is declared. After input the value from the user-end a loop is declared that compare and swap value and print its value.A virus that loads itself onto the target system's memory, infects other files, and then unloads itself is called a:
Answer:
True. A virus that loads itself onto the target system's memory, infects other files, and then unloads itself is called a: Direct-action virus.
Explanation:
A virus that loads itself onto the target system's memory, infects other files, and then unloads itself is called a Direct-action virus.
What is Direct-action virus?A direct action computer virus is known to be a virus class that is said to be self-multiplying malware that is known to be attached to any executable file.
Therefore, Note that A virus that loads itself onto the target system's memory, infects other files, and then unloads itself is called a Direct-action virus.
Learn more about virus from
https://brainly.com/question/26128220
#SPJ2
(b) Write a program which displays the following pattern as an output.
*
**
***
****
*****
(Hint: using loop)
this is the answer for your question i´m guessing i hope this helped :)
******
write a program to input 100 students marks and find the highest marks among the them
Answer:
Explanation:
The following code is a Python program that allows you to input 100 marks. You can input the value -1 to exit the loop early. Once all the marks are entered the program prints out the highest mark among all of them. The output can be seen in the attached picture below with a test of a couple of marks.
marks = []
for x in range(100):
mark = int(input("Enter a mark: "))
if mark == -1:
break
else:
marks.append(mark)
print("Max value: " + str(max(marks)))