Answer:
Program approach:-
Using the necessary header file.Using the standard namespace I/O.Define the integer main function.Mapping course numbers and room numbers.Explanation:
//header file
#include<iostream>
#include<map>
//using namespace
using namespace std;
//main function
int main(){
//creating 3 required maps
map <string,int> rooms;
map <string,string> instructors;
map <string,string> times;
//mapping course numbers and room numbers
rooms.insert(pair<string,int>("CS101",3004));
rooms.insert(pair<string,int>("CS102",4501));
//mapping course numbers and instructor names
instructors.insert(pair<string,string>("CS101","Haynes"));
instructors.insert(pair<string,string>("CS102","Alvarado"));
//mapping course numbers and meeting times
times.insert(pair<string,string>("CS101","8:00am"));
times.insert(pair<string,string>("CS102","9:00am"));
char choice='y';
//looping until user wishes to quit
while(choice=='y' || choice=='Y'){
cout<<"Enter a course number: ";
string course;
cin>>course;//getting course number
//searching in maps for the required course number will return
//an iterator
map<string, int>::iterator it1=rooms.find(course);
map<string, string>::iterator it2=instructors.find(course);
map<string, string>::iterator it3=times.find(course);
if(it1!=rooms.end()){
//found
cout<<"Room: "<<it1->second<<endl;
}else{
//not found
cout<<"Not found"<<endl;
}
if(it2!=instructors.end()){
cout<<"Instructor: "<<it2->second<<endl;
}
if(it3!=times.end()){
cout<<"Meeting Time: "<<it3->second<<endl;
}
//prompting again
cout<<"\nDo you want to search again? (y/n): ";
cin>>choice;
}
In a non-price rationing system, consumers receive goods and services first-come, first served. Give me an example of a time when a consumer may experience this.
When someone may be giving away something for free.
Write a static method named lowestPrice that accepts as its parameter a Scanner for an input file. The data in the Scanner represents changes in the value of a stock over time. Your method should compute the lowest price of that stock during the reporting period. This value should be both printed and returned as described below.
Answer:
Explanation:
The following code is written in Java. It creates the method as requested which takes in a parameter of type Scanner and opens the passed file, reads all the elements, and prints the lowest-priced element in the file. A test case was done and the output can be seen in the attached picture below.
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
class Brainly{
public static void main(String[] args) throws FileNotFoundException {
Scanner console = new Scanner(System.in);
System.out.print("file location: ");
String inputLocation = console.next();
File inputFile = new File(inputLocation);
Scanner in = new Scanner(inputFile);
lowestPrice(in);
}
public static void lowestPrice(Scanner in) {
double smallest = in.nextDouble();
while(in.hasNextDouble()){
double number = in.nextDouble();
if (number < smallest) {
smallest = number;
}
}
System.out.println(smallest);
in.close();
}
}
Use Python to: Combine the lists x, y, and z into one multi-dimensional array. Print the multi-dimensional array. Use the values within the multi-dimensional array to print this message:
THE SECRET LIES WITHIN.
#code start
x = ["N", "O", "H", "S"]
y = ["I", "R", "L", "T"]
z = ["C", "A", "W", "E"]
# Add code here.
( Note: a correct answer is needed as soon as possible. The due date is tomorrow )
Answer: ok I got tmdirn
Explanation:
Sensors send out ............ signals
Answer:
mhmm................... ok
mention 3 components that can be found at the back and front of the system unit
Answer:
Back
Power port, USB port, Game port
Front
Power button, USB port, Audio outlet
Explanation:
There are several components that can be found on the system unit.
In most (if not all) computer system units, you will find more component at the back side than the front side.
Some of the components that can be found at the back are:
Ports for peripherals such as the keyboard, mouse, monitor, USB ports, power port, etc.
Some of the components that can be found at the back are:
The power button, cd rom, audio usb ports, several audio outlets, video port, parallel ports, etc.
Note that there are more components on the system units. The listed ones are just a fraction of the whole components
The following method is intended to return true if and only if the parameter val is a multiple of 4 but is not a multiple of 100 unless it is also a multiple of 400. The method does not always work correctly public boolean isLeapYear(int val) if ((val 4) == 0) return true; else return (val & 400) == 0; Which of the following method calls will return an incorrect response?
A .isLeapYear (1900)
B. isLeapYear (1984)
C. isLeapYear (2000)
D. isLeapYear (2001)
E. isLeapYear (2010)
Answer:
.isLeapYear (1900) will return an incorrect response
Explanation:
Given
The above method
Required
Which method call will give an incorrect response
(a) will return an incorrect response because 1900 is not a leap year.
When a year is divisible by 4, there are further checks to do before such year can be confirmed to be a leap year or not.
Since the method only checks for divisibility of 4, then it will return an incorrect response for years (e.g. 1900) that will pass the first check but will eventually fail further checks.
Hence, (a) answers the question;
What happens to a message when it is deleted?
It goes to a deleted items area.
It goes to a restored items area.
It is removed permanently.
It is archived with older messages.ppens to a message when it is deleted?
Answer:
it goes to the deleted items area
Explanation:
but it also depends on where you deleted it on
Answer: The answer would A
You are tasked with writing a program to process sales of a certain commodity. Its price is volatile and changes throughout the day. The input will come from the keyboard and will be in the form of number of items and unit price:36 9.50which means there was a sale of 36 units at 9.50. Your program should read in the transactions (Enter at least 10 of them). Indicate the end of the list by entering -99 0. After the data is read, display number of transactions, total units sold, average units per order, largest transaction amount, smallest transaction amount, total revenue and average revenue per order.
Answer:
Here the code is given as,
Explanation:
Code:
#include <math.h>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
int v_stop = 0,count = 0 ;
int x;
double y;
int t_count [100];
double p_item [100];
double Total_rev = 0.0;
double cost_trx[100];
double Largest_element , Smallest_element;
double unit_sold = 0.0;
for( int a = 1; a < 100 && v_stop != -99 ; a = a + 1 )
{
cout << "Transaction # " << a << " : " ;
cin >> x >> y;
t_count[a] = x;
p_item [a] = y;
cost_trx[a] = x*y;
v_stop = x;
count = count + 1;
}
for( int a = 1; a < count; a = a + 1 )
{
Total_rev = Total_rev + cost_trx[a];
unit_sold = unit_sold + t_count[a];
}
Largest_element = cost_trx[1];
for(int i = 2;i < count - 1; ++i)
{
// Change < to > if you want to find the smallest element
if(Largest_element < cost_trx[i])
Largest_element = cost_trx[i];
}
Smallest_element = cost_trx[1];
for(int i = 2;i < count - 1; ++i)
{
// Change < to > if you want to find the smallest element
if(Smallest_element > cost_trx[i])
Smallest_element = cost_trx[i];
}
cout << "TRANSACTION PROCESSING REPORT " << endl;
cout << "Transaction Processed : " << count-1 << endl;
cout << "Uints Sold: " << unit_sold << endl;
cout << "Average Units per order: " << unit_sold/(count - 1) << endl;
cout << "Largest Transaction: " << Largest_element << endl;
cout << "Smallest Transaction: " << Smallest_element << endl;
cout << "Total Revenue: $ " << Total_rev << endl;
cout << "Average Revenue : $ " << Total_rev/(count - 1) << endl;
return 0;
}
Output:
what is microsoft excel
Answer:
A spreadsheet program included in Microsoft Office suit of application. Spreadsheets present tables of value arranged in rows and columns that can be manipulated mathematically using both basic and advanced functions.
Answer:
Microsoft Excel is a digital spreadsheets program developed by windows for various platforms. You can make graphs, pivot tables, calculators, and a macro programming language alled Visual Basic created for Applications.
for macroscale distillations, or for microscale distillations using glassware with elastomeric connectors, compare the plot from your simple distillation with that from your fractional distillation. in which case do the changes in temperature occur more gradually
Answer:
Fractional Distillation
Explanation:
Fractional Distillation is more effective as compared to simple distillation. In simple distillation, the temperature changes more gradually as compared to the fractional distillation
Write a method, findMax(), that takes in two integers and returns the largest value. Ex: If the program input is: 4 2 the method findMax() returns: 4 Note: Your program must define the method: public int findMax(int num1, int num2)
public int findMax(int num1, int num2){
if(num1 > num2){
return num1;
}
else {
return num2;
}
}
Explanation:The code has been written in Java and the following explains every part of the code.
i. Start with the method header:
public int findMax(int num1, int num2)
ii. Followed by a pair of curly braces representing the block for the method.
public int findMax(int num1, int num2){
}
iii. Within the block, write the statements to find out which is greater between num1 and num2
This is done with an if..else statement. To check if num1 is greater than num2, write the following within the block.
if(num1 > num2){
return num1;
}
else {
return num2;
}
The if block tests if num1 is greater than num2. If it is, then num1 will be returned.
The else block is executed only if num1 is not greater than num2. In this case, num2 will be returned since it is greater.
iv. Put all together
public int findMax(int num1, int num2){
if(num1 > num2){
return num1;
}
else {
return num2;
}
}
1) It is possible to email a document
directly from the Word application.
O FALSE
O TRUE
Answer:
True
Explanation:
What new details are you able to see on the slide when the magnification is increased to 10x that you could not see at 4x? What about 40x?
Answer:
x=10
Explanation:
just need points because i can scan questions anymore
I Previous
C Reset
2/40 (ID: 34700)
E AA
Examine the following code:
Mark For Review
def area (width, height)
area = width * height
return area
boxlarea = area (5,2)
box2area = area (6)
What needs to change in order for the height in the area function to be 12 if a height is not specified when calling the function?
0 0 0 0
Add a height variable setting height =12 inside the function
Change the box2area line to box 2area = area (6,12)
Add a height variable setting height =12 before the function is declared
Change the def to def area (width, height = 12)
Answer:
D. Change the def to def area (width, height = 12)
Explanation:
Required
Update the function to set height to 12 when height is not passed
To do this, we simply update the def function to:
def area (width, height = 12)
So:
In boxlarea = area (5,2), the area will be calculated as:
[tex]area = 5 * 2 = 10[/tex]
In box2area = area (6), where height is not passed, the area will be calculated as:
[tex]area = 6 * 12 = 72[/tex]
For this activity, you will practice being both proactive and reactive to bugs. Both are necessary to get rid of errors in code.
Proactive:
Log in to REPL.it and open your Calculator program that you built in Unit 5.
In the index.js file, type and finish the following block of code that validates the input to make sure both are numbers (not letters or symbols):
try{
if (isNaN(…) || isNaN(…)){
throw …
}
else{
document.getElementById("answer").innerHTML = num1 + num2;
}
}
catch(e){
document.getElementById("answer")…
}
(Note: The || symbol is used in JavaScript to mean or . You can find this key to the left of the Z key if you’re using a PC or directly above the Enter key if you’re using a Mac.)
Add the finished code above to the correct place in your add() function. Make sure to delete this line since we moved it into the try block:
document.getElementById("answer").innerHTML = num1 + num2;
Paste the same code into the subtract() , multiply() , and divide() functions, making the necessary changes. Be careful with your divide() function since you already have an extra if else statement checking for a division by 0 mistake. (Hint: Cut and paste the entire if else statement inside the else block of your try statement.)
Test your program by typing in letters or symbols instead of numbers. Make sure you get the appropriate error message. (Note: The function is not supposed to check whether the text field is empty, only whether it contains non-numbers.)
When you are finished, share the link to your webpage with your teacher by clicking on the share button and copying the link.
Reactive:
The following Python program should print the sum of all the even numbers from 0 to 10 (inclusive), but it has two bugs:
x = 0
sum = 0
while x < 10:
sum = sum + x
x = x + 1
print(sum)
Complete a trace table and then write a sentence or two explaining what the errors are and how to fix them. You can choose whether to do the trace table by hand or on the computer. Turn in your trace table and explanation to your teacher.
Answer:
okk
Explanation:
What is the most efficient way to control the type of information that is included in the .msg file when a user forwards a
contact to another user?
Use the "As an Outlook Contact option.
Create an additional contact with limited information.
o Use the Business Card option.
Create the contact using the XML format.
Answer: Use the "As an Outlook Contact option.
Explanation:
The most efficient way to control the type of information which will be included in the .msg file when a contact is forwarded to another user by a user is to use the Use the "As an Outlook Contact option.
After clicking on the contact that you want to forward it to, then click on forward, click on contact and click on As an Outlook Contact. You can then complete the email message, after which you'll click on send.
Consider the following class definitions.
public class Apple
{
public void printColor()
{
System.out.print("Red");
}
}
public class GrannySmith extends Apple
{
public void printColor()
{
System.out.print("Green");
}
}
public class Jonagold extends Apple
{
// no methods defined
}
The following statement appears in a method in another class.
someApple.printColor();
Under which of the following conditions will the statement print "Red" ?
I. When someApple is an object of type Apple
II. When someApple is an object of type GrannySmith
III. When someApple is an object of type Jonagold
a. I only
b. II only
c. I and III only
d. II and III only
e. I, II, and III
Modity your program Modify the program to include two-character .com names, where the second character can be a letter or a number, e.g., a2.com. Hint: Add a second while loop nested in the outer loop, but following the first inner loop, that iterates through the numbers 0-9 2 Program to print all 2-letter domain names Run 3 Note that ord) and chr) convert between text and ASCII/ Uni 4 ord (.a.) is 97, ord('b') IS 98, and so on. chr(99) is 'c", et Running done. domain Two-letter a. com ?? . com ac.com ad. com ae.com ai. com ag.com names: 6 print'Two-letter domain names:" 8 letter1 'a' 9 letter2 10 while letter! < 'z': # Outer loop letter2a" while letter2 <- "z': # Inner loop 12 13 14 print('%s %s.com" % (letteri, letter2)) letter2chr(ord (letter2) 1) 15 letterl chr(ord(letter1) + 1) 16 17 h.com ai.com j com ak.com Feedback?
Answer:
The addition to the program is as follows: digit = 0
while digit <= 9:
print('%s%d.com' % (letter1, digit))
digit+=1
Explanation:
This initializes digit to 0
digit = 0
This loop is repeated from 0 to 9 (inclusive)
while digit <= 9:
This prints the domain (letter and digit)
print('%s%d.com' % (letter1, digit))
This increases the digit by 1 for another domain
digit+=1
See attachment for complete program
5.19 LAB: Output values in a list below a user defined amount
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value.
Ex: If the input is:
5
50
60
140
200
75
100
the output is:
50,60,75,
The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75.
For coding simplicity, follow every output value by a comma, including the last one.
Such functionality is common on sites like Amazon, where a user can filter results.
Answer:
The program in Python is as follows:
n = int(input())
myList = []
for i in range(n):
num = int(input())
myList.append(num)
threshold = int(input())
for i in myList:
if i<= threshold:
print(i,end=", ")
Explanation:
This gets the number of inputs
n = int(input())
This creates an empty list
myList = []
This iterates through the number of inputs
for i in range(n):
For each iteration, this gets the input
num = int(input())
And appends the input to the list
myList.append(num)
This gets the threshold after the loop ends
threshold = int(input())
This iterates through the list
for i in myList:
Compare every element of the list to the threshold
if i<= threshold:
Print smaller or equal elements
print(i,end=", ")
The Python program below gets a list of integers, then filters that list based on a threshold value:
########################################################
# initialize the integer and output lists
integer_list = [ ]
output_list = [ ]
# first enter the number of integers that will follow
# and append it to integer list
qty = int(input("Enter the number of integers to follow: "))
integer_list.append(qty)
# next enter the number of integers and append them to integer list
for i in range(0, qty):
num = int(input("Enter an integer: "))
integer_list.append(num)
# finally enter the threshold value to be used to filter the integers
threshold = int(input("Enter the threshold value: "))
integer_list.append(threshold)
# filter the integers
for num in integer_list:
if num <= integer_list[-1]:
output_list.append(num)
# display the result
print("The values from { } that are less than or equal to { } are
{ }".format(integer_list[1:-1], integer_list[-1], output_list))
########################################################
The program first asks the user to enter the following:
The number of integers to be checkedThe integers themselvesThe threshold value to be used for filteringThe program next iterates over the integer list and filters the integers from index 1 to index -1(exclusive, since this is the threshold value) based on the element at index -1(the last element, the threshold value).
Each element that satisfies the filtering criterion (e <= threshold) is added to the output list and printed out later.
Another example of a Python program is found here: https://brainly.com/question/24941798
QUESTION 8
A weakness of PHP is that it only supports one database, MySQL.
True
False
QUESTION 9
All variable names in PHP are case-insensitive.
O True
False
QUESTION 10
An HTML form that is part of the PHP script that processes it is known as self-adhesive?
True
False
Answer:
question 8 is true
Explanation:
PHP is a server-side scripting language for creating dynamic web pages. ... The PHP programming language receives that request, makes a call to the MySQL database, obtains the requested information from the database, and then presents the requested information to your visitors through their web browsers.
Discuss at least 1 Microsoft Windows security features that could protect data?
Answer:
Virus & threat protection.
Explanation:
Monitor threats to your device, run scans, and get updates to help detect the latest threats.
One Microsoft Windows security feature that can help protect data is BitLocker Drive Encryption.
BitLocker is a full-disk encryption feature available in certain editions of Microsoft Windows, such as Windows 10 Pro and Enterprise. It provides protection for data stored on the system's hard drives or other storage devices.
By encrypting the entire drive, BitLocker helps safeguard the data against unauthorized access or theft, even if the physical drive is removed from the device. It uses strong encryption algorithms to convert the data into an unreadable format, ensuring that only authorized users with the appropriate encryption key or password can access and decrypt the data.
BitLocker also provides additional security features, such as pre-boot authentication, which requires users to enter a password or use a USB key to unlock the drive before the operating system loads. This prevents unauthorized users from accessing the encrypted data, even if they have physical access to the device.
Overall, BitLocker Drive Encryption is a powerful security feature in Microsoft Windows that can effectively protect data by encrypting entire drives and adding layers of authentication and protection against unauthorized access.
Learn more about Security here:
https://brainly.com/question/13105042
#SPJ6
A reflective cross-site scripting attack (like the one in this lab) is a __________ attack in which all input shows output on the user’s/attacker’s screen and does not modify data stored on the server.
Answer:
" Non-persistent" is the right response.
Explanation:
A cross-site category of screenplay whereby harmful material would have to include a transaction to have been transmitted to that same web application or user's device is a Non-persistent attack.Developers can upload profiles with publicly available information via social media platforms or virtual communication or interaction.What help in executing commands quickly
Answer:99
Explanation: Last summer, my family and I took a trip to Jamaica. My favorite part of the trip was when we went to a place called the Luminous Lagoon. We ate dinner and waited for the sun to go down. Then we boarded a boat and went out into the lagoon. That’s when the magic started.
At first we could not see very much in the darkness except for the stars in the sky. After a few minutes, however, I noticed some fish swimming in the water. They didn’t look like ordinary fish. These fish were glowing! Our guide explained that the glow came from tiny creatures in the water called dinoflagellates. These little animals are not visible to us, but their bodies produce light using something called bioluminescence, just like fireflies. There are so many of these creatures in Luminous Lagoon that the water around them seems to glow.
After our guide explained these facts to us, he told us to put our hands in the water. I was not sure if it would work, but I tried it. When I did, my hand looked like it belonged to a superhero! It was glowing bright blue. I hope someday I get to return to the Luminous Lagoon. The lights in the water were much more entertaining than the ones in the sky.
Problem:
audio
The Greek prefix dinos- means “whirling” and the Latin root word flagellum means “whip”. What does dinoflagellate most likely mean as it is used in the passage?
audio
the production of light from an organism’s body
audio
the study of creatures that live in the ocean
audio
to move around underwater water like a fish
audio
an organism with a whip-like part it uses to move around in the water
You are designing an application at work that transmits data records to another building in the same city. The data records are 500 bytes in length, and your application will send one record every 0.5 seconds
Is it more efficient to use a synchronous connection or an asynchronous connection? What speed transmission line is necessary to support either type of connection? Show all your work.
Solution :
It is given that an application is used to transmit a data record form one building to another building in the same city, The length of the data records is 500 bytes. and the speed is 0.5 second for each record.
a). So for this application, it is recommended to use a synchronous connection between the two building for data transfer as the rate data transfer is high and it will require a master configuration between the two.
b). In a synchronous connection, 500 bytes of data can be sent in a time of 0.5 sec for each data transfer. So for this the line of transmission can be either wired or wireless.
lolhejeksoxijxkskskxi
loobovuxuvoyuvoboh
Explanation:
onovyctvkhehehe
Answer:
jfhwvsudlanwisox
Explanation:
ummmmmm?
To quit, a user types 'q'. To continue, a user types any other key. Which expression evaluates to true if a user should continue
Answer:
!(key == 'q')
Explanation:
Based on the description, the coded expression that would equate to this would be
!(key == 'q')
This piece of code basically states that "if key pressed is not equal to q", this is because the ! symbol represents "not" in programming. Meaning that whatever value the comparison outputs, it is swapped for the opposite. In this case, the user would press anything other than 'q' to continue, this would make the expression output False, but the ! operator makes it output True instead.
What is the use of Name Box in MS-Excel?
Answer:
To be able to set a variable or set value for a specific box or collum of boxes.
why stress testing is needed?
Answer:
To be able to test a product if it can withstand what it is supposed to before being released to the public for saftey reasons.
Answer:
Stress testing involves testing beyond normal operational capacity, often to a breaking point, to observe the results. Reasons can include:
Helps to determine breaking points or safe usage limits Helps to confirm mathematical model is accurate enough in predicting breaking points or safe usage limits Helps to confirm intended specifications are being met Helps to determine modes of failure (how exactly a system fails) Helps to test stable operation of a part or system outside standard usage Helps to determine the stability of the software.Stress testing, in general, should put computer hardware under exaggerated levels of stress to ensure stability when used in a normal environment.
4. Interaction between seller and buyer is called___.
A. Demanding
B. Marketing
C. Transactions
D. Oppurtunity
Answer:
C. Transactions.
Explanation:
A transaction can be defined as a business process which typically involves the interchange of goods, financial assets, services and money between a seller and a buyer.
This ultimately implies that, any interaction between a seller and a buyer is called transactions.
For example, when a buyer (consumer) pays $5000 to purchase a brand new automobile from XYZ automobile and retail stores, this is referred to as a transaction.
Hence, a transaction is considered to have happened when it's measurable in terms of an amount of money (price) set by the seller.
Price can be defined as the amount of money that is required to be paid by a buyer (customer) to a seller (producer) in order to acquire goods and services. Thus, it refers to the amount of money a customer or consumer buying goods and services are willing to pay for the goods and services being offered. Also, the price of goods and services are primarily being set by the seller or service provider.
Design an if-then statement ( or a flowchart with a single alternative decision structure that assigns 20 to the variable y and assigns 40 to the variable z if the variable x is greater than 100?
Answer:
The conditional statement and its flowchart can be defined as follows:
Explanation:
Conditional statement:
if x>100 Then //defining if that check x value greater than 100
y=20//holding value in the y variable
z=40//holding value in z variable
End if