Answer: YES
Explanation:
int year=2019;
int yearNext=2020;
int &ref=year;
&ref=yearNext; {This line leads to error as references cannot be reassigned}
(//compilation error: lvalue required as left operand of assignment
) lvalue(&ref) is not something which can be assigned.
To get this better, here are the difference between pointers and reference variables
Pointers
Pointers can be incremented
Array can be formed with pointers
Pointers can be reassigned
Pointer can be declared as void
Reference variable
References cannot be incremented
Array cannot be formed with references
References cannot be reassigned as references shares the address of the variable its assigned
References can never be void
Write down the information for your system’s active network connection (most likely either Ethernet or Wi-Fi).
Question:
1. Open a command prompt window, type ipconfig/ all and press Enter.
2. Write down the information for your system’s active network connection(most likely either Ethernet or Wi-Fi).
* Physical address in paired hexadecimal form.
* Physical address expressed in binary form.
Answer:
00000000 11111111 00000011 10111110 10001100 11011010
Explanation:
(i)First, open a command prompt window by using the shortcut: Windows key + X then select command prompt in the list.
(ii)Now type ipconfig/ all and press Enter. This will return a few information
(a) To get the Physical address in paired hexadecimal form, copy any of the Physical Addresses shown. E.g
00-FF-03-BE-8C-DA
This is the hexadecimal form of the physical address.
(b) Now let's convert the physical address into its binary form as follows;
To convert to binary from hexadecimal, we can use the following table;
Hex | Decimal | Binary
0 | 0 | 0000
1 | 1 | 0001
2 | 2 | 0010
3 | 3 | 0011
4 | 4 | 0100
5 | 5 | 0101
6 | 6 | 0110
7 | 7 | 0111
8 | 8 | 1000
9 | 9 | 1001
A | 10 | 1010
B | 11 | 1011
C | 12 | 1100
D | 13 | 1101
E | 14 | 1110
F | 15 | 1111
Now, from the table;
0 = 0000
0 = 0000
F = 1111
F = 1111
0 = 0000
3 = 0011
B = 1011
E = 1110
8 = 1000
C = 1100
D = 1101
A = 1010
Put together, 00-FF-03-BE-8C-DA becomes;
00000000 11111111 00000011 10111110 10001100 11011010
PS: Please make sure there is a space between ipconfig/ and all
cal address EtherAddr. What would happen if, when you manually added an entry, you entered the correct IP address, but the wrong Ethernet address for that remote interface
Learn more:
brainly.com/question/7342246
The Address Resolution Protocol ARP cache maintained by ARP keeps a record of IP addresses and their corresponding Media Access Control, MAC address
The correct response to what would happen if the wrong EtherAddr is
entered into the arp-s InetAddr EtherAddr command is that;
The system will not be able to connect to the IP address linked to the wrong Ethernet address.
The reason the above response is correct is as follows:
Characteristics of the ARP protocol;
The ARP protocol is a protocol that has a high level of control such that
the reply is trusted and can be used to redirect traffic through spoofing of
the responses to ARP which are then stored in the cache.
Functioning of the arp -s InetAddr EtherAddr command;
The command arp -s InetAddr EtherAddr command inputs a manual entry
into the ARP cache that works to assign the inputted IP address in InetAddr
to the MAC physical address in EtherAddr.
The ARP provides the translation from physical MAC addresses of Layer 2
to the IP address of Layer 3 by mapping the MAC address to the IP
address.
Solution:
What would happen if, when you manually added an entry, you entered the correct IP address, but the wrong Ethernet address for that remote interface is as follows;
When the wrong Ethernet address is entered in the arp -s command, the
IP-address is resolved as belonging to the wrong Ethernet or MAC
address, and if the address does not exist, it will not be possible to
connect to the correct or desired IP address.
Learn more about ARP here:
https://brainly.com/question/13068535
https://brainly.com/question/22696379
https://brainly.com/question/12975431
Select the correct answer.
Maggie is preparing a business report. Which type of keys will she use to type in letters, numbers, symbols, and punctuations?
A typing keys
B. navigation keys
C.
function keys
OD
control keys
Answer:
Explanation:
On a windows operating system or any computer based application there are only three types of keys, these are alphanumeric keys, punctuation keys and special keys. Therefore the answers provided are not accurate. Each of these types of keys serves different purposes as follows.
Letters – use alphanumeric keys Numbers – use alphanumeric keys Symbols – use punctuation keys Punctuations – use punctuation keysIf you must use the answers choices provided we can say the following
Letters – use alphanumeric keys - typing keysNumbers – use alphanumeric keys - typing keysSymbols – use punctuation keys - function keysPunctuations – use punctuation keys - typing keys
The type of keys Maggi will use to type in letters, numbers, symbols, and punctuations are: A. typing keys.
An input device can be defined as an electronic device that is typically designed and used for sending data to a computer system. Thus, these devices are used for entering data (information) into a computer system.
In Computer technology, some examples of input devices include the following:
MouseScannerMicrophoneKeyboardA keyboard refers to a an electronic device that is typically designed to allow end users type textual information such as letters, numbers, symbols, and punctuations.
In this scenario, the type of keys Maggi will use to type in letters, numbers, symbols, and punctuations are typing keys because it comprises the 26 alphabets, number one to nine, and special characters or symbols.
Read more: https://brainly.com/question/17402566
Suppose you are provided with 2 strings to your program. Your task is to join the strings together so you get a single string with a space between the 2 original strings. This is a common case is coding and you will need to create your output by joining the inputs and adding the space in the middle.
# Input from the command line
import sys
string1 = sys.argv[1]
string2 = sys.argv[2]
Answer:
public class TestImport{
public static void main(String[] args) {
String string1 = args[1];
String string2 = args[2];
System.out.println(string1 +" " +string2);
}
}
Explanation:
The solution here is to use string concatenation as has been used in this statement System.out.println(string1 +" " +string2);
When this code is run from the command line and passed atleast three command line arguments for index 0,1,2 respectively, the print statment will return the second string (that is index1) and the third argument(that is index2) with a space in-between the two string.
hard disk drive has 16 platters, 8192 cylinders, and 256 4KB sectors per track. The storage capacity of this disk drive is at most Select one: a. 32 GB. b. 128 GB. c. 128 TB. d. 32 TB.
Answer:
B
Explanation:
Here, we want to calculate the storage capacity of the disk drive.
We proceed as follows;
Per track capacity = 4 * 256 KB = 1024 KB = 1 MB
per platter capacity = 1 MB * 8192 = 8192 MB
total capacity = 16 * 8192 MB = 131072 MB
converting total capacity to GB,
1024 MB = 1 GB
thus, 131,072 MB to GB would be;
total capacity =131072/1024 = 128GB
What is the difference between requirements and controls in the security process? Give examples of each.
Answer:
Security controls are those measures taken to prevent, identify, counteract, and reduce security risks to computer systems, whereas, Security Requirements are guidelines or frameworks that stipulates measures to ensure security control.
Explanation:
Security controls encompass all the proactive measures taken to prevent a breach of the computer system by attackers. Security requirements are those security principles that need to be attained by a system before it can be certified as safe to use.
Security controls are of three types namely, management, operational, and technical controls. Examples of technical controls are firewalls and user authentication systems. A statement like 'The system shall apply load balancing', is a security requirement with an emphasis on availability.
In total, how many 8-bit registers are there in the Intel 80x86 CPU design presented in class? Name one of these 8-bit registers.
Answer:
In general the number of bit registers in Intel 80x86 CPU design when combined together forms a 16 - bit register
An example of the -bit registers are AH, AL, BH, BL, CH, CL, DH, and DL
Explanation:
Solution
The 8086 CPU design has a total of eight 8-bit registers and these register can be integrated together to make 16- bit register as well.
The 16-bit data is stored by breaking the data into a low-order byte and high order byte.
The name of the 8 bit registers is shown below:
AH, AL, BH, BL, CH, CL, DH, and DL
Which test refers to the retesting of a unit, integration and system after modification, in order to ascertain that the change has not introduced new faults?
Answer:
Regression test
Explanation:
There are different types of testing in software development. Some of them are;
i. Smoke test
ii. Interface test
iii. Alpha test
iv. Beta/Acceptance test
v. Regression test
vi. System test
While all of these have their individual meanings and purposes, the regression test seeks to confirm that a recent update, modification or change in the underlying program code of the application (software) has not affected the existing features. This test ensures that a change to a software has not introduced new bugs or vulnerabilities to the state of the software before the change was made.
Regression test is actually done when;
i. there is a change in requirements of the software and thus the code is modified.
ii. a new feature is added to the software.
True or False: It is okay to just paste the URLs of the items you used for references at the end of a paper. Select one: True False
It is not okay to just paste the URLs of the items you used for references at the end of a paper therefore the answer is False
For better understanding, lets explain why the answer is false
When citing a reference it not OK to cite URLs. when you are citing onlh the URL is wrong because theURL could change at any time and the fact remain that it is not everyone who reads your paper can do it electronically or has access to the internet., so the url is not the first step to take. The right thing to do is to give the name of the paper, the author(s), the Journal it was published in and the year it was published.
From the above, we can therefore say that the answer is It is not okay to just paste the URLs of the items you used for references at the end of a paper therefore the answer is False, is correct.
Learn more about referencing from:
https://brainly.com/question/13003724
Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay the hourly rate for the hours up to 40 and 1.5 times the hourly rate for all hours worked above 40 hours. Use 45 hours and a rate of 10.50 per hour to test the program (the pay should be 498.75).
Answer:
Following is the program in the python language
hr = input("input hours:") #Read input by user
h1 = float(hr)
rate =input("Input Rate:") #Read RATE BY USER
r1 = float(rate) #CONVERT INTO FLOAT
if h1 <= 40: #check condition
t=h1 * r1
print (t) #DISPLAY
else :#else block
t1=(40 * r1) + (h1 -40) * r1 * 1.5
print('The pay is :')
print(t1)#DISPLAY
Output:
input hours:45
Input Rate:10.50
The pay is :
498.75
Explanation:
Following are the description of program
Read the value of hour in the "hr" variable and convert into the float value in the "h1" variable .Read the value of rate in the " rate" variable and convert into the float value in the "r1" variable .After that check the condition of hour if block if the hour is less then or equal to 40 then it multiplied h1 *t1 otherwise else block will be executed and print the value of pay .
Can Someone Help
Please Show Work
Answer:
1) 1/14
2) 1/7
Explanation:
Summer Vacation
Number of times letters listed
S 1
U 1
M 2
E 1
R 1
V 1
A 2
C 1
T 1
I 1
O 1
N 1
Probability= Successful outcome ÷ Possible outcome.
Successful outcome(C)=1
*Successful outcome(M)=2
Successful outcome refers to letters chosen.
*Possible outcome=14
*Possible outcome refers to total number of letters.
Probability of C =1/14
Probability of M= 2/14=1/7
Hope this helps ;) ❤❤❤
Let me know if there is an error in my answer.
What would be suggested way to share and sustain knowledge with members in a team ?
A) Sharing of best practices and lessons learnt through emails
B) Sharing knowledge through knowledge sharing sessions
C) Sharing knowledge through informal conversations, for example, during lunch breaks.
D) Sharing best practices, lessons learnt and other topics in a central place where team can collaborate
Answer: D) Sharing best practices, lessons learned and other topics in a central place where the team can collaborate
Explanation: Knowledge sharing within a team is usually an important aspect of building a strong and efficient team. Acquiring knowledge usually comes from the experience gathered from previous projects, learning, or tips learned from various sources. Therefore, sharing knowledge is always a good way to ensure that what is gained is sustained by letting others know. Sharing and sustaining knowledge is most effective when transmitted or aired to a group of people usually a team gathered in an interactive setting which allows members to freely share experience and get feedback, views, or thoughts from other collaborators.
(Find the index of the smallest element) Write a function that returns the index of the smallest element in a list of integers. If the number of such elements is greater than 1, return the smallest index. Use the following header: def indexOfSmallestElement(lst): Write a test program that prompts the user to enter a list of numbers, invokes this function to return the index of the smallest element, and displays the index.
Answer:
Here is the function that returns the the smallest element in a list of integers
def indexOfSmallestElement(lst):
smallest = lst.index(min(lst))
return smallest
Explanation:
The function indexOfSmallestElement() takes a list of integers lst as parameter.
smallest = lst.index(min(lst))
In the above statement two methods are used i.e. index() and min().
The first method index returns the index position of the list and the second method min() returns the minimum element of the list.
Now as a whole the statement min() first returns the smallest element in the list (lst) of integers and then the index() method returns the position of that minimum element of lst. At the end the index position of this smallest element in the list (lst) is stored in the smallest variable.
So lets say if we have a list of the following elements: [3,2,1,7,1,8] then min() returns the smallest element in this list i.e. 1 and index() returns the index position of this smallest element. Now notice that 1 occurs twice in the list and index() method only returns the the first index found in the list. So it returns the smallest index of the two index positions of 1 i.e 2. Hence the output is 2.
The test program is given below:
lst=list()
num=int(input("Enter the list size: "))
print("Enter a list of numbers: ")
for i in range(int(num)):
integers=int(input(""))
lst.append(integers)
print("The index of the smallest element is: ")
print(indexOfSmallestElement(lst))
First the list named lst is created. After that the user is prompted to enter the size of the list which determines how many elements user wants to add to the list. num holds the size input by user. After that print statement displays the line"Enter a list of numbers: ". Next the for loop takes the integers from user num times. Suppose user want to enter 3 as list size then loop will take 3 elements from user. int(input("")) in this statement integer type input is taken from user using input() method. lst.append(integers) statement is used to append these input integers into the list i.e. lst. print(indexOfSmallestElement(lst)) the statement calls the indexOfSmallestElement by passing lst to this method to return the index of the smallest element in the list of integers.
What are the differences between editing manually and editing digitally? What tools are used for each?
Answer:
Both manual and digital editing are concepts used in proofreading.
Manual editing is also called "hard proofreading" (or "hard proofing" for short). It is the process of proofreading, modifying or revising printed documents. In this type of proofreading, one would normally manually mark parts of the printed documents with editing materials such as ink, pen, marker e.t.c
Digital editing is also called "soft proofing". In contrast to manual editing, this type is done on digital documents. These documents include, but not limited to, DOC, txt, PDF, image, audio and video files.
Tools for editing manually are;
i. pen
ii. ink
iii. tipex
Tools for editing digitally are;
i. Photoshop application
ii. Text editors such as notepad++, Microsoft word
Proofreading has evolved in recent times as a result of advancements in technology. Now, manual proofreading has paved way for digital proofreading, which allows revising of PDF and DOC files. The difference in both forms is as follows:
Manual Editing: In the process of revising or proofing printed documents, one would manually apply standard proofreading marks. Manual editing is also known as "Hard proofing", as the process requires proofreaders to mark the hard copies.
Digital Editing: In the process of revising or proofing digital documents i.e. PDF and DOC files, one would digitally apply the proofreading marks. Thus, corrections and edits are transferred electronically among authors, proofreaders. Digital editing is also known as "Soft proofing", as the process requires proofreaders to mark the soft copies i.e. without using any paper or pen.
There are a number of electronic tools and marks available for both techniques of
proofreading. Some tools used for manual proofreading include- deletion, capitalization, and insertion, close-up, transpose.
Tools used in digital proofreading include- spell check, readability levels, trite expressions, and comment, track changes.
Learn More: https://brainly.com/question/10002469
A cashier distributes change using the maximum number of five-dollar bills, followed by one-dollar bills. Write a single statement that assigns num_ones with the number of distributed one-dollar bills given amount_to_change. Hint: Use %. Sample output with input: 19
Answer:
amount_to_change = int(input("Enter amount to change: "))
num_fives = amount_to_change // 5
num_ones = amount_to_change % 5
print("There are " + str(num_fives) + " five dollars and " + str(num_ones) + " one dollars in the change")
Explanation:
Ask the user to enter the amount_to_change
Calculate the number of five dollars, use floor division
Calculate the number of one dollars, use modulo operator
Print the number of five dollars and number of one dollars
#this is 34 lines -- you can do it! # #In web development, it is common to represent a color like #this: # # rgb(red_val, green_val, blue_val) # #where red_val, green_val and blue_val would be substituted #with values from 0-255 telling the computer how much to #light up that portion of the pixel. For example: # # - rgb(255, 0, 0) would make a color red. # - rgb(255, 255, 0) would make yellow, because it is equal # parts red and green. # - rgb(0, 0, 0) would make black, the absence of all color. # - rgb(255, 255, 255) would make white, the presence of all # colors equally. # #Don't let the function-like syntax here confuse you: here, #these are just strings. The string "rgb(0, 255, 0)" #represents the color green. # #Write a function called "find_color" that accepts a single #argument expected to be a string as just described. Your #function should return a simplified version of the color #that is represented according to the following rules: # # If there is more red than any other color, return "red". # If there is more green than any other color, return "green". # If there is more blue than any other color, return "blue". # If there are equal parts red and green, return "yellow". # If there are equal parts red and blue, return "purple". # If there are equal parts green and blue, return "teal". # If there are equal parts red, green, and blue, return "gray". # (even though this might be white or black). #Write your function here!
Answer:
Following are the code to this question:
def find_color(color):#definig a method find_color that accepts color parameter
color = str(color).replace('rgb(', '').replace(')', '')#definig color variable that convert parameter value in string and remove brackets
r, g, b = int(color.split(', ')[0]), int(color.split(', ')[1]), int(color.split(', ')[2])#defining r,g,b variable that splits and convert number value into integer
if r == g == b:#defining if block to check if r, g, b value is equal
return "gray"#return value gray
elif r > g and r > b:#defining elif block that checks value of r is greater then g and b
return "red"#return value red
elif b > g and b > r:#defining elif block that checks value of b is greater then g and r
return "blue"#return value blue
elif g > r and g > b:#defining elif block that checks value of g is greater then r and b
return "green"#return value green
elif r == g:#defining elif block that checks r is equal to g
return "yellow"#return value yellow
elif g == b:#defining elif block that checks g is equal to b
return "teal"#return value teal
elif r == b:#defining elif block that checks r is equal to b
return "purple"#return value purple
print(find_color("rgb(125, 50, 75)"))#using print method to call find_color method that accepts value and print its return value
print(find_color("rgb(125, 17, 125)"))#using print method to call find_color method that accepts value and print its return value
print(find_color("rgb(217, 217, 217)"))#using print method to call find_color method that accepts value and print its return value
Output:
red
purple
gray
Explanation:
In the above method "find_color" is declared that uses the color variable as the parameter, inside the method a color variable is declared that convert method parameter value into the string and remove its brackets, and three variable "r,g, and b" is defined. In this variable first, it splits parameter value and after that, it converts its value into an integer and uses the multiple conditional statements to return its calculated value.
if block checks the r, g, and b value it all value is equal it will return a string value, that is "gray" otherwise it will go to elif block. In this block, it checks the value of r is greater then g, and b if it is true it will return a string value, that is "red" otherwise it will go to another elif block. In this block, it checks the value of b is greater then g, and r if it is true it will return a string value, that is "blue" otherwise it will go to another elif block. In this block, it checks the value of g is greater then r and b if it is true it will return a string value, that is "green" otherwise it will go to another elif block. In the other block, it checks r is equal to g or g is equal to b or r is equal to b, it will return the value, that is "yellow" or "teal" or "purple".A technician is evaluating malware that was found on the enterprise network. After reviewing samples of the malware binaries, the technician finds each has a different hash associated with it. Which of the following types of malware is MOST likely present in the environment?
a. Trojan
b. Polymorphic worm
c. Rootkit
d. Logic bomb
e. Armored virus
Answer:
(b) polymorphic worm
Explanation:
A polymorphic worm can be compared with a chameleon. It changes its color so as to blend with the background of the surrounding to avoid being seen or caught. A polymorphic worm is a special type of worm that keeps changing its constituent features in order to avoid being detected. The most common way in which polymorphic worms hide their codes is by using encryption.
Polymorphic worms have two parts: the part that changes and the one that does not change. The part that changes include the characteristics of the worm such as encryption key, associated hash value e.t.c. The part that does not change is basically its functionality. Therefore, although the characteristics of the worm keep changing, its overall function remains the same.
A security analyst is performing a BIA. The analyst notes that in a disaster, failover systems must be up and running within 30 minutes. The failover systems must use back up data that is no older than one hour. Which of the following should the analyst include in the business continuity plan?
A. A maximum MTTR of 30 minutes
B. A maximum MTBF of 30 minutes
C. A maximum RTO of 60 minutes
D. An SLA guarantee of 60 minutes
Answer:
D. A maximum RPO of 60 minutes
Explanation:
Note that an option is not included in this list of options.
The complete list of options is:
A. A maximum MTTR of 30 minutes
B. A maximum MTBF of 30 minutes
C. A maximum RTO of 60 minutes
D. A maximum RPO of 60 minutes
E. An SLA guarantee of 60 minutes
The Recovery Point Objective tells how old a backup file must be before it can be recovered by a system after failure.
Since the data in the failover systems described in this question must be backup and recovered after the failure, it will be important to include the Recovery Point Objective (RPO) in the Business Continuity Plan.
Since the failover systems must use back up data that is no older than one hour, the backup of the system data must be done at intervals of 60 minutes or less. Meaning that the maximum RPO is 60 minutes.
Note that RPO is more critical than RTO in data backup
A security administrator is investigating a report that a user is receiving suspicious emails. The user's machine has an old functioning modem installed. Which of the following security concerns need to be identified and mitigated? (Choose two.)
A. Vishing
B. Whaling
C. Spear phishing
D. Pharming
E. War dialing
F. Hoaxing
Answer: Spear phishing; Pharming
Explanation:
Based on the information given in the question, the security concerns that need to be identified and mitigated are spear phishing and pharming.
Spear phishing is the fraudulent practice whereby emails are sent from a trusted sender in which people are targeted to give out some confidential information.
Pharming is a cyberattack whereby the traffic of a website is redirected to another fake site. This is typically done when the host file on the computer of the victim has been changed.
The Employee class will contain a String attribute for an employee’s name and a double attribute for the employee’s salary. Which of the following is the most appropriate implementation of the class?
a. public class Employee
{
public String name;
private double salary;
// constructor and methods not shown
}
b. public class Employee
{
private String name;
private double salary;
// constructor and methods not shown
}
c. private class Employee
{
public String name;
public double salary;
// constructor and methods not shown
}
d. private class Employee
{
private String name;
private double salary;
// constructor and methods not shown
}
Answer:
The answer is "Option b".
Explanation:
In the choice b, a public class "Employee" is declared, in which two private variables "name and salary" is declared whose data type is a string and double. At this, the class is accessible outside the scope but it variable accessible in the class only and the wrong choice can be defined as follows:
In choice a, datatypes access modifiers were different that's why it is wrong.In choice c and d both classes use a priavte access modifier, which means it can't accessible outside that's why it is wrong.The terminal window wants to evaluate your current bash knowledge by using the ~/workspace/nested-directories folder:
a. cd into the nested-directories/nested-level-1/ directory by using an absolute path
b. cd into the nested-level-3/ directory by using a relative path
d. Move the entire ~/workspace/config/ directory to the nested-level-1/ directory
Answer:
a. cd into the nested directories/ nested - level - 1 / directory using an absolute path
Explanation:
The directory is a location on the hard disk, which is also called a folder. It contains the files and also contains the other directories called sub directories.
A path to a file is merged with a slash and determines the file or directory in the operating system. An absolute path is the location file or directory from the actual file system
The directory's absolute path starts with a slash, and all slashed in the directory separates the directions.
All directions in the absolute path are written on the left side. The last name in the path may belong to the file, and the pwd command can determine the current directory.
The relative path is the location of the file. It begins with the working directory. An absolute path is unambiguous and working with deeply nested directories.
There are two commands which are used such as
cd pwdcd is used for changing directorypwd is used for the working directoryWe easily navigate the file system with the help of an absolute path.
C++ 3.4.4: If-else statement: Print senior citizen. Write an if-else statement that checks patronAge. If 55 or greater, print "Senior citizen", otherwise print "Not senior citizen" (without quotes). End with newline.
Answer:
#include <iostream>
using namespace std;
int main()
{
int patronAge = 71;
if(patronAge >=55)
cout<<"Senior citizen"<<endl;
else
cout<<"Not senior citizen"<<endl;
return 0;
}
Explanation:
Initialize the patronAge age, in this case set it to 71
Check the patronAge. If it is greater than or equal to print "Senior citizen". Otherwise, print "Not senior citizen". Use "endl" at the end of each print statement to have new lines.
Define a function named swap_nums that has 2 parameters: num_one and num_two. The function should swap the two numbers by using only one additional variable!
Answer:
def swap_nums(num_one, num_two):
temp_value = num_one
num_one = num_two
num_two = temp_value
return num_one, num_two
print(swap_nums(10, 20))
Explanation:
Create a function called swap_nums that takes num_one and num_two as parameters.
Inside the function, create a temporary variable, temp_value, and set it to the num_one. Set the num_one as num_two and num_two as temp_value. Return the num_one and num_two
Call the function with two numbers and print the result
Write a program that asks users to enter letter grades at the keyboard until they hit enter by itself. The program should print the number of times the user typed A on a line by itself.
Answer:
The complete code in Python language along with comments for explanation and output results are provided below.
Code with Explanation:
# the index variable will store the number of times "A" is entered
index = 0
while True:
# get the input from the user
letter = input('Please enter letter grades: ')
# if the user enters "enter" then break the loop
if letter == "":
break
# if user enters "A" then add it to the index
if letter == "A":
index = index + 1
# print the index variable when the loop is terminated
# the str command converts the numeric type into a string
print("Number of times A is entered: " + str(index))
Output:
Please enter letter grades: R
Please enter letter grades: A
Please enter letter grades: B
Please enter letter grades: L
Please enter letter grades: A
Please enter letter grades: A
Please enter letter grades: E
Please enter letter grades:
Number of times A is entered: 3
Your smartphone, digital camera, and printer are all part of a network in your workspace. What type of network is likely in use
Answer:
PAN
Explanation:
PAN, short form of Personal Area Network, is a type of computer network built for personal use typically within a building. This could be inside a small office or a bedroom in a residence. This type of network basically consists of one or more personal computers, digital camera, printer, Tv, scanner, telephones, peripheral devices, video games console, and other similar devices.
It is pretty much simple to set up and allow for great flexibility. In this network, a single modem can be set up to enable both wired and wireless connections for multiple devices within the building.
Write a program named Deviations.java that creates an array with the deviations from average of another array. The main() method
Answer:
hello your question is incomplete attached is the complete question and solution
answer : The solution is attached below
Explanation:
Below is a program named Derivations.java that creates an array with the deviations from average of another array.
What's the value of this Python expression? ((10 >= 5*2) and (10 <= 5*2))
Answer:
The Boolean value returned by that expression will be True
Explanation:
We have two logical statements in that expression:
Expression 1: (10 >= 5*2)
This can be read as: is 10 greater than or equal to 5 multipled by 2. This evaluates to true as 10 is equal to 5 * 2. Hence expression 1 returns true
Expression 2: (10 <= 5*2)
This can be read as: is 10 less than or equal to 5 multiplied by 2. This also evaluates to true as 10 is equal to 5*2. Hence expression 2 returns true.
Now between this two expression is the and operator which evaluates to true if and only if both logical expressions returnes true.
True and True ==> True
Since Expression 1 ==> True and Expression 2 ==> True
This means Expression 1 and Expression 2 ==> True which is the Boolean value returned by the statement
The value of the python expression ((10 >= 5*2) and (10 <= 5*2)) is True
The code will definitely return a Boolean value(True or False).
For the expression to be True , the two statements must be True. The AND gate returns True if the whole statement is True.
(10 >= 5*2) is True because 10 is equals to 5 × 2 = 10.
(10 <= 5*2) is True because 10 is equals to 5 × 2 = 10.
The two statements are True . Therefore,
True and True = True.
learn more on python code; https://brainly.com/question/17013562?referrer=searchResults
Write a split check function that returns the amount that each diner must pay to cover the cost of the meal The function has 4 parameters:
1. bill: The amount of the bill,
2. people. The number of diners to split the bill between
3. tax_percentage: The extra tax percentage to add to the bill.
4. tip_percentage: The extra tip percentage to add to the bill.
The tax or tip percentages are optional and may not be given when caling split_check. Use default parameter values of 0.15 (15%) for tip percentage, and 0.09 (9%) for tax_percentage
Sample output with inputs: 252
Cost per diner: 15.5
Sample output with inputs: 100 2 0.075 0.20
Cost per diner: 63.75
1 # FIXME: write the split.check function: HINT: Calculate the amount of tip and tax,
2 # add to the bill total, then divide by the number of diners
3.
4. Your solution goes here
5.
6. bill - float(input)
7. people intinout)
8.
9. Cost per diner at the default tax and tip percentages
10. print('Cost per diner: split_check(bill, people))
11.
12. bill - float(input)
13. people int(input)
14. newtax_percentage - float(input)
15. nen_tip percentage float(input)
16.
17. Oust per dinero different tox and tip percentage
18. print('Cost per diner: split checkbull people, new tax percentage, new tip percentage)
Answer:
def split_check(bill, people, tax_percentage = 0.09, tip_percentage = 0.15):
tip = bill * tip_percentage
tax = bill * tax_percentage
total = bill + tip + tax
return total / people
bill = float(input())
people = int(input())
print("Cost per diner: " + str(split_check(bill, people)))
bill = float(input())
people = int(input())
new_tax_percentage = float(input())
new_tip_percentage = float(input())
print("Cost per diner: " + str(split_check(bill, people, new_tax_percentage, new_tip_percentage)))
Explanation:
Create a function called split_check that takes four parameters, bill, people, tax_percentage and tip_percentage (last two parameters are optional)
Inside the function, calculate the tip and tax using the percentages. Calculate the total by adding bill, tip and tax. Then, return the result of total divided by the number of people, corresponds to the cost per person.
For the first call of the function, get the bill and people from the user and use the default parameters for the tip_percentage and tax_percentage. Print the result.
For the second call of the function, get the bill, people, new_tip_percentage and new_tax_percentage from the user. Print the result.
def split_check(bill, people, tax_percentage = 0.09, tip_percentage = 0.15):
tip = bill * tip_percentage
tax = bill * tax_percentage
total = bill + tip + tax
return total / people
bill = float(input())
people = int(input())
print("Cost per diner: " + str(split_check(bill, people)))
bill = float(input())
people = int(input())
new_tax_percentage = float(input())
new_tip_percentage = float(input())
print("Cost per diner: " + str(split_check(bill, people, new_tax_percentage, new_tip_percentage)))
Create a function called split_check that takes four parameters, bill, people, tax_percentage and tip_percentage (last two parameters are optional)
Inside the function, calculate the tip and tax using the percentages. Calculate the total by adding bill, tip and tax. Then, return the result of total divided by the number of people, corresponds to the cost per person.
For the first call of the function, get the bill and people from the user and use the default parameters for the tip_percentage and tax_percentage. Print the result.
For the second call of the function, get the bill, people, new_tip_percentage and new_tax_percentage from the user. Print the result.
Learn more about function on:
https://brainly.com/question/30721594
#SPJ6
Problem You Need to Solve for This Lab:
You are asked to write an app to keep track of a relatively small music library. The app should load song information from a data file once the app is started. It should allow user to view, add, remove, and search for songs. The app should save the data back to the same data file when the program exits.
What Your Program Should Do:
Write an interactive text based menu interface (using a loop) that will allow the user to
ï‚· Enter information for a new song
ï‚· Display information for all the songs in the database with index for each song
ï‚· Remove a song by index
ï‚· Search for songs by a certain artist
ï‚· Search for songs by a certain album
ï‚· Quit
For each song, you need to keep track of:
title
artist
duration
album
Allow the program to keep looping until user wants to quit. When the program starts, it should load the tasks from external file ("songs.txt") into memory. When user enters information about the new song, the program needs to read them in, save them in memory and eventually write them to the external data file ("songs.txt"). The file format could look like:
Stereo Hearts;Gym Class Heroes;3;34;The Papercut Chronicles II
Counting Stars;OneRepulic;4;17;Native
The ';' is used as a delimiter or field separator. Each record ends with a new line character.
Some Implementation Requirements:
Write at least four functions WITH arguments for this assignment.
Use struct named Song to model each song
Use array of structs to model the collection of songs.
Hint: In this assignment, some data fields may have multiple words in it. Therefore,
you now SHOULD read using the 3 argument version of get.
Watch out. When using the 3 argument version of get you need to make sure to
remove the delimiter or newline. Therefore, anytime you read (even a confirmation
message), make sure to eat the newline using cin.ignore(...)!
Make sure to have a delimiter written between each item in the file – like a newline.
This will be important when you read the information back from the file.
For submission, your data file should contain a sufficient set of test data. It should have test cases for same artist with multiple songs and same album with multiple songs in it.
Do-Not List:
No Global Variables (you can have global constants)
Do not use Classes or Linked Lists
You must use cstring and char arrays. (do not use )
No use of the stdio library (use iostream and fstream)
Instead of the string class, you will be using arrays of characters and the cstring library
No STL containers such as vector. You must implement your own array for this class.
Answer:
Write questions properly
Explanation:
Then it is easy to say answer
A copy of the copyrighted work must be exactly the same as the original to infringe a copyright.
1. True
2. False
Answer:
true
Explanation: