Answer:
False.
Explanation:
The correct option is false that is to say the arrangement is not true. So, let us check one or two things about the RSA System.
The RSA system simply refer to as a cryptosystem that was first established in the year 1973 but was later developed in the year 1977 by Ron Rivest, Adi Shamir and Leonard Adleman.
The main use of the RSA system is for encryption of messages. It is known as a public key cryptography algorithm.
The way the algorithm should have been arranged is;
(1). Randomly select two large prime numbers p and q, which always must bekept secret.
(2). Determine the product n = pq, known as public modulus.
(3). Select an integer number E, known as the public exponent, such that (p 1)and E have no common divisors, and (q 1) and E have no commondivisors.
(4). Determine the private exponent, D, such that (ED 1) is exactly divisible by both (p 1) and (q 1). In other words, given E, we choose D such that the integer remainder when ED is divided by (p1)(q 1) is 1.
(5). Release publicly the public key, which is the pair of numbers n and E, K =(n, E). Keep secret the private key, K = (n, D).
Therefore, The way it should have been arranged in the question should have been;
(1) , (4), (2), (3 ) and ( 5).
What are the four steps of the research process?
Answer:
Step 1: Identify the Problem
Step 2: Review the Literature. ...
Step 3: Clarify the Problem Step 4: Clearly Define Terms and Concepts.
Use computer software packages, such as Minitab or Excel, to solve this problem. The owner of Showtime Movie Theaters, Inc., used multiple regression analysis to predict gross revenue () as a function of television advertising () and newspaper advertising (). Values of , , and are expressed in thousands of dollars. Weekly Gross Revenue ($1000vs) Television Advertising ($1000in) Newspaper Advertising ($1000s) 96 5 1.5 90 2 2 95 4 1.5 92 2.5 2.5 95 3 3.3 94 3.5 2.3 94 2.5 4.2 94 3 2.5 The estimated regression equation was a. What is the estimated gross revenue for a week where thousand is spent on television and thousand is spent on newspaper advertising (to 3 decimals)
Answer:
a. Gross revenue
b. 95% P.I ( 91.774, 95.400)
Explanation:
Please check the file attached below to see the solution to given question using minitab
The program 4 should first tell users that this is a word analysis file. For any user-given text file, the program will read, analyze, and write each word with the line numbers where the word is found in an output file. A word may appear in multiple lines. A word shows more than once at a line, the line number will be only recorded one time.Ask a user to enter the name of a text file. Using try/except for invalid user input. Then the program reads the contents of the text file and create a dictionary in which the key-value pairs are described as follows:" Key. The key are the individual words found in the file. "Value. Each value is a list that contains the line numbers in the file where the word (the key) is found. Be aware that a list may have only one element.Once the dictionary has been built, the program should create another text file, named "word_index.txt". Next, write the contents of the dictionary to the file as an alphabetical listing of the words that are stored as keys in the dictionary (sorting the keys), along with the line numbers where the words appear in the original file. Please see the sample file for reference.Looking to seeing everyone to submit a well-done program! Here are some tips: "Documents/Comments of your program (Never more) "Testing your program by the given two files, Kennedy.txt and romeo.txt. The output file of the Kennedy.txt, "Kennedy_index.txt" and the output file for romeo.txt, "romeo_index.txt,. Please compare your program files with them. "Text File to be analyzed: romeo.txtArise: 5But: 1It: 3Juliet: 3Who: 7already: 7and: 3, 5, 7breaks: 1east: 3envious: 5fair: 5grief: 7is: 3, 7kill: 5light: 1moon: 5pale: 7sick: 7soft: 1sun: 3, 5the: 3, 5through: 1what: 1window: 1with: 7yonder: 1Text File to be analyzed: Kennedy.txtWe: 1a: 1, 2, 4an: 3as: 4, 5, 6beginning: 4but: 2celebration: 2change: 6end: 3freedom: 3not: 1observe: 1of: 2, 3party: 2renewal: 5signifying: 5symbolizing: 3today: 1victory: 1well: 4, 5romeo.txt But soft what light through yonder window breaks It is the east and Juliet is the sun Arise fair sun and kill the envious moon Who is already sick and pale with griefKennedy.txt We observe today not a victory of party but a celebration of freedom symbolizing an end as well as a beginning signifying renewal as well as change
Answer:
See explaination
Explanation:
import os,string
def readfile(filename):
if os.path.isfile(filename) is not True:return None
line_number=1
word_dict={}
print('Text File to be analyzed: {}'.format(filename))
with open(filename,'r') as infile:
for line in infile.readlines():
words = line.strip().split()
for word in words:
word = word.strip(string.punctuation)
if word.strip()=='':continue
if word_dict.get(word)==None:
word_dict[word]=[line_number]
else:
line_number_list=word_dict.get(word)
line_number_list.append(line_number)
line_number+=1
return word_dict
def write_to_file(word_dict,filename):
with open(filename,'w') as outfile:
for word in sorted(word_dict.keys()):
outfile.write('{0}:\t\t{1}\n'.format(word,','.join([str(n) for n in word_dict.get(word)])))
def main():
filename='D:\\Word.txt'
output_filename='D:\\word_index.txt'
word_dict = readfile(filename)
if word_dict ==None:
print('Unable to read file {}'.format(filename))
else:
for word in sorted(word_dict.keys()):
print('{0}:\t\t{1}'.format(word,','.join([str(n) for n in word_dict.get(word)])))
write_to_file(word_dict,output_filename)
main()
short notes on Supply chain Management System (SCMS)
Answer: Its the is the centralized management of the flow of goods and services and includes all processes that transform raw materials into final products. By managing the supply chain, companies are able to cut excess costs and deliver products to the consumer faster.
It is a management of the flow of goods, data, and finances related to a product or service, from the procurement of raw materials to the delivery of the product at its final destination.
Explanation: ik its long but hope it helps
What process is used to convert numbers between the binary system and the decimal system?
ANSWER: D) Look up the number on a binary-to-decimal conversion table
Answer:
The method is easy . Divide the binary number by 2 and write the remainder . Again divide by 2 and write remainder and continue till remainder becomes 1 . Then write all the remainders (0 , 1) in the order . The decimal is converted into binary
If you wanna convert binary into decimal , number the digits of a binary number from right to left and from 0 to how much digits are there. Then the digit 1 or 0 is multiplied by the corresponding power of 2 , which comes after numbering . Add all them and you get them into decimal
Answer:
The answer is D) Look up the number on a binary-to-decimal conversion table.
Explanation:
A company with a large number of hosts creates three subdomains under a main domain. For easier management of the host records, how many zones should be used
Answer:
4
Explanation:
For easier management of the host records of the company 4 zones should be used because
subdomain is part of a larger domain and the main domain which is the primary domain is the name which the company have decide to use which will represent the company website address and in a situation where the company
have different domain names in which they had registered, they will need to choose one among the domain which will inturn be their main domain.
Therefore for easier , efficient and effective management of the host records 4 zones will be the best zones to be used.
Example of sub domain is north.example.com
For easier management of the host records, 4 zones should be used
Host record or a DNS host, is simply known as record in one's domain's DNS zone file that is said to create the connection between one's domain and its matching IP address.
It is also called an A or Address record. It is said to links a domain to the physical IP address of a computer hosting that has the domain's services.
4 zones in the subdomain is good because a subdomain is part of a larger domain and the main domain and therefore having four will cater for all.
Its gives a creative approach to the management of DNS, DHCP, and IPAM data.
Conclusively, the use of host records helps to manage multiple DNS records, DHCP and IPAM data.
Learn more from
https://brainly.com/question/19281141
Create a single list that contains the following collection of data in the order provided:
[1121, "Jackie Grainger", 22.22,
1122, "Jignesh Thrakkar", 25.25,
1127, "Dion Green", 28.75, False,
24.32, 1132, "Jacob Gerber",
"Sarah Sanderson", 23.45, 1137, True,
"Brandon Heck", 1138, 25.84, True,
1152, "David Toma", 22.65,
23.75, 1157, "Charles King", False,
"Jackie Grainger", 1121, 22.22, False,
22.65, 1152, "David Toma"]
The data above represents employee information exported from an Excel spreadsheet. Whomever typed the data in originally didn't give much care to how the information was formatted, unfortunately. Each line of data has in it employee information (the whole number), the name of the employee (the string), and the employee's hourly wage (the decimal number). Some rows have extra information in them from a column in the spreadsheet that no one can remember what its purpose was.
Note that the presence of a couple of new data types in the above - "float" values (the numbers with the decimals in them) and "bool" [short for boolean] values (True and False).
Assume that the above information is a small sample of the company's data. Programmatically sort the information into three different lists: one for employee numbers, one for employee names, and one for employee salary information.
No duplicate data should make its way into the new lists.
For each value in the list containing hourly wage information, multiply the current value by 1.3 (since benefits are about 30% of a person's salary) and store each value in a list called total_hourly_rate. Programmatically determine the maximum value in the list and if it's over over 37.30, throw a warning message that someone's salary may be a budget concern.
Determine if anyone's total hourly rate is between 28.15 and 30.65. If they are, add the hourly rate a new list called underpaid_salaries.
For each value in the list that contains unmodified salary information, calculate a raise in dollars according to the following rules:
If the hourly rate is between 22 and 24 dollars per hour, apply a 5% raise to the current rate. If the hourly rate is between 24 and 26 dollars per hour, apply a 4% raise to the current rate. If the hourly rate is between 26 and 28 dollars per hour, apply a 3% raise to the current rate. All other salary ranges should get a standard 2% raise to the current rate.
Add each new value you calculate to a new list called company_raises.
Design your own complex condition with no fewer than four different truth tests in it (all conditions must be on one line, in other words). Above your condition, write out in comments the exact behavior you are implementing with Python.
Answer:
A code was created to single list that contains the following collection of data in the order provided
Explanation:
Solution
#list that stores employee numbers
employeee_numbers=[1121,1122,1127,1132,1137,1138,1152,1157]
#list that stores employee names
employee_name=["Jackie Grainger","Jignesh Thrakkar","Dion Green","Jacob Gerber","Sarah Sanderson","Brandon Heck","David Toma","Charles King"]
#list that stores wages per hour employee
hourly_rate=[22.22,25.25,28.75,24.32,23.45,25.84,22.65,23.75]
#list that stores salary employee
company_raises=[]
max_value=0
#list used to store total_hourly_rate
total_hourly_rate=[]
underpaid_salaries=[]
#loop used to musltiply values in hourly_wages with 1.3
#and store in new list called total_hourly_rate
#len() is used to get length of list
for i in range(0,len(hourly_rate)):
#append value to the list total_hourly_rate
total_hourly_rate.append(hourly_rate[i]*1.3)
for i in range(0,len(total_hourly_rate)):
#finds the maximum value
if(total_hourly_rate[i]>max_value):
max_value=total_hourly_rate[i] #stores the maximum value
if(max_value>37.30):
print("\nSomeone's salary may be a budget concern.\n")
for i in range(0,len(total_hourly_rate)):
#check anyone's total_hourly_rate is between 28.15 and 30.65
if(total_hourly_rate[i]>=28.15 and total_hourly_rate[i]<=28.15):
underpaid_salaries.append(total_hourly_rate[i])
for i in range(0,len(hourly_rate)):
#check anyone's hourly_rate is between 22 and 24
if(hourly_rate[i]>22 and hourly_rate[i]<24):
#adding 5%
hourly_rate[i]+=((hourly_rate[i]/100)*5)
elif(hourly_rate[i]>24 and hourly_rate[i]<26):
#adding 4%
hourly_rate[i]+=((hourly_rate[i]/100)*4)
elif(hourly_rate[i]>26 and hourly_rate[i]<28):
#adding 3%
hourly_rate[i]+=((hourly_rate[i]/100)*3)
else:
#adding 2% for all other salaries
hourly_rate[i]+=((hourly_rate[i]/100)*2)
#adding all raised value to company_raises
company_raises.extend(hourly_rate)
#The comparison in single line
for i in range(0,len(hourly_rate)):
For this exercise i used ternary
operator hourly_rate[i]= (hourly_rate[i]+((hourly_rate[i]/100)*5)) if (hourly_rate[i]>22 and hourly_rate[i]<24) else (hourly_rate[i]+((hourly_rate[i]/100)*4)) if (hourly_rate[i]>24 and hourly_rate[i]<26) else hourly_rate[i]+((hourly_rate[i]/100)*2)
can a +2 management studnet from nepal study computer engineer in UK?
Answer: The UK government offers a global scholarship programme called “Chevening”. It is open to all international students who meet the Chevening eligibility criteria, which states you must have applied for at least three degree courses in the UK, usually one-year Master's courses
Explanation: So yes that should be fine
In python, the ! symbol is used to show that the line of code takes priority over another line. True or false
Answer:true
Explanation:
Answer:
true
Explanation:
Write two separate formulas using different commands that concatenate " john and "smith" together to form " John Smith"
Answer:
1. =CONCATENATE(" John"," ","Smith")
2. =(" John"&" "&"Smith")
Explanation:
Given
Two separate strings; "John" and "Smith"
Required
2 separate formulas to concatenate both strings to form " John Smith"
There are several ways to concatenate strings in Microsoft Office Excel; one of the methods is using the concatenate function while the another method is using the traditional & operator.
Using the concatenate function, the formula is as follows
=CONCATENATE(" John"," ","Smith")
This function will combine the " John", " " and "Smith" to give a new string " John Smith" (without the quotes).
Using the traditional & operator may be a little bit difficult (and not frequently used) but the formula is as follows;
=(" John"&" "&"Smith")
The result will be the same as (1) above
What kind of testing is basically checking whether a game or feature works as expected by the developers?
acceptance
functional
compatibility
load
Translate We get up at 8 o'clock into Spanish in the box below:
Answer:
nos despertamos a las ocho
Explanation:
What is the most flexible way to modify a report?
Use the Design view.
Use the Report button.
Click Report Wizard.
Select the Preview view.
Answer: Use the Design view
Explanation: Using a Design view to modify a report is the most flexible way to modify a report as opposed to a layout view which is another way to modify a report . The design view is flexible in the sense that it provides a more outlined structured view of your report that you can see the header and footer for the report. it also affords you the ability to control your report in terms of changing many properties, adjusting images, labels and editing text box, etc.
Answer:
The answer is A: Use the Design view.
Explanation:
Must be completed in JAVA
Complete SortedTableMap. The SortedTreeMap from the final lecture uses an AVLTree to implement the SortedMap interface so that the essential methods run in O(log n) time, which is relatively quite good. For this problem, complete the empty SortedTableMap class by using an ArrayList to implement the SortedMap interface. It will not be possible to implement all of the essential methods so that they run in O(log n) time, but your implementation should be as runtime efficient as possible. Specifically, the get method can be done in O(log n) time; some other methods can be done in O(n), some can be done in O(1).
package Class;
/*
* This file should not be modified
*/
public interface SortedMap extends Map {
Entry firstEntry();
Entry lastEntry();
Entry floorEntry(K key);
Entry ceilingEntry(K key);
Entry lowerEntry(K key);
Entry higherEntry(K key);
Iterable> subMap(K fromKey, K toKey);
}
package Class;
import java.util.ArrayList;
import java.util.Comparator;
/*
* Complete this file for part 3 of the assignment
*
* No additional classes should be imported
*/
public class SortedTableMap extends AbstractMap implements SortedMap {
}
Answer:
What is your question?
Chemical equations of Carbon + water
Answer:
Aqueous carbon dioxide, CO2 (aq), reacts with water forming carbonic acid, H2CO3 (aq). Carbonic acid may loose protons to form bicarbonate, HCO3- , and carbonate, CO32-. In this case the proton is liberated to the water, decreasing pH. The complex chemical equilibria are described using two acid equilibrium equations.
PLS MARK AS BRAINLIEST
The user interface contains two types of user input controls: TextInput, which accepts all characters and Numeric Input, which accepts only digits.
1. Implement the class TextInput that contains:
O Public method def add(c : Char) - concatenates the given character to the current value
O Public method def getValue(): String - returns the current value
Implement the class NumericInput that:
O Inherits from TextInput
O Overrides the add method so that each non-numeric character is ignored
For example, the following code should output "10":
$input = new NumericInput();
$input->add('1');
$input->add('a');
$input->add('0');
echo $input->getValue();
The code skeleton is provided below:
<?php
class TextInput
{
}
class Numericinput
{
{
//$input = new NumericInput();
//$input->add('1');
//$input->add('a');
//$input->add('0');
//echo $input->getValue();
Answer:
Explanation:
public class Main
{
private static String val; //current val
public static class TextInput
{
public TextInput()
{
val= new String();
}
public void add(char c)
{
if(val.length()==0)
{
val=Character.toString(c);
}
else
{
val=val+c;
}
}
public String getvalue()
{
return val;
}
}
public static class NumericInput extends TextInput
{
Override
public void add(char c)
{
if(Character.isDigit(c))
{
//if character is numeric
if(val.length()==0)
{
val=Character.toString(c);
}
else
{
val=val+c;
}
}
}
}
public static void main(String[] args)
{
TextInput input = new NumericInput();
input.add('1');
input.add('a');
input.add('0');
System.out.println(input.getvalue());
}
}
discuss 5 features of mobile phones and how it can help play in a holistic digital marketing strategy
Answer:
1. Mobile Friendly Website
Statistics claim that by 2013 more people will be accessing websites via their cell phones as opposed to desktops and laptops. This means that mobile optimized websites are more important now more than ever before.
2. SMS (Text) Alerts/Reminders
SMS has many useful applications in the mobile technology realm, one of which is alerts and reminders. Having the ability to contact your customers with simple text messages is non-intrusive and convenient. Two current examples of industries utilizing SMS alerts and reminders are banks and retail chains. Banks use this technology to alert customers of balances on their accounts. Retails chains can alert customers when certain products are discounted or available.
3. SMS Voting/Polling
Many of you may be familiar with this technology already. Television shows like American Idol and America’s Got Talent already utilize this technology to rank contestants. However, this technology is also helpful in the business world, where users can poll or vote on various products and services. What a great way to get valid feedback on your business!
4. Mobile Commerce
60% of consumers are purchasing goods and services on their mobile phones. They are also able to compare prices with competing vendors.
The invention of Near Field Communications (NFC) in the mobile commerce arena is going to explode. NFC allows you to wave your phone over a compatible device at your retailer to purchase goods or services. This ability to purchase products with your smartphone is a convenient technology that may one day “eliminate” the need for a wallet.
5. Mobile Applications
There’s an app for that, and that’s no joke. Companies and organizations worldwide have adopted the use of mobile apps to help increase awareness and revenue streams. Mobile apps can provide data such as product information, account information, games, scores to a sporting event, streaming audio, and this goes on and on.
Studies show that users prefer mobile games, social media, maps and music in the form of an app, as opposed to a web based interaction. There is a sense of security with an application that is installed and trusted by a relevant source on your mobile phone. This does not mean that mobile websites do not have their place, they do, and it’s up to the organization to determine the best use of a mobile web or mobile app.
Explanation:
Write a program to create a customer bill for a company. The company sells only five products: TV, DVD player, Remote Controller, CD Player, and Audio Visual Processor. The unit prices are $500.00, $380.00, $35.20, $74.50, and $1500.00, respectively. Part I ( this part is not that much different from Lab 2, as far as formatting) Prompt the user and input for the quantity of each product sold. Calculate the Subtotal for each item and the Subtotal of the bill. Calculate the Tax on the Bill Subtotal. Last calculate the grand Total of Subtotal plus Tax. Test Data sets: 13, 2, 3, 1, 21 Sample Outputs: How many TVs were sold? 13 How many DVD players were sold? 2 How many Remote Controller units were sold? 3 How many CD Players were sold? 1 How many AV Processors were sold? 21
Answer:
A program written in C++ was create for a customer bill for a company. the company sells five products, which are TV, DVD player, Remote Controller, CD Player, and Audio Visual Processor.
The code is implemented and shown below in the explanation section
Explanation:
Solution:
The C++ Code:
#include<iostream>
#include<string>
#include<iomanip>
using namespace std;
#define taxrate 8.75
int main(){
const double upTv = 500.00;
const double upDvdPlayer = 380.00;
const double upRemoteController = 35.00;
const double upCdPlayer = 74.00;
const double upAudioVideoProcessor = 1500.00;
cout << "How many TVs were sold? ";
double ntv;
cin >> ntv;
cout << "How many DVD players were sold? ";
double ndvd;
cin >> ndvd;
cout << "How many Remote Controllers were sold? ";
double nrc;
cin >> nrc;
cout << "How many CD Players were sold? ";
double ncd;
cin >> ncd;
cout << "How many AV Processors were sold? ";
double nav;
cin >> nav;
double ptv = ntv * upTv;
double pdvd = ndvd * upDvdPlayer;
double prc = nrc * upRemoteController;
double pcd = ncd * upCdPlayer;
double pav = nav * upAudioVideoProcessor;
double tp = ptv + pdvd + prc + pcd + pav;
cout << setw(5) << left << "QTY";
cout << setw(20) << left << "Description";
cout << setw(15) << left << "Unit Price";
cout << setw(15) << left << "Price" << endl;
cout << setw(5) << left << (int)ntv;
cout << setw(20) << left << "TV";
cout << setw(15) << left << fixed << setprecision(2) << upTv;
cout << setw(15) << left << fixed << setprecision(2) << ptv << endl;
cout << setw(5) << left << (int)ndvd;
cout << setw(20) << left << "DVD";
cout << setw(15) << left << fixed << setprecision(2) << upDvdPlayer;
cout << setw(15) << left << fixed << setprecision(2) << pdvd << endl;
cout << setw(5) << left << (int)nrc;
cout << setw(20) << left << "Remote Controller";
cout << setw(15) << left << fixed << setprecision(2) << upRemoteController;
cout << setw(15) << left << fixed << setprecision(2) << prc << endl;
cout << setw(5) << left << (int)ncd;
cout << setw(20) << left << "CD Player";
cout << setw(15) << left << fixed << setprecision(2) << upCdPlayer;
cout << setw(15) << left << fixed << setprecision(2) << pcd << endl;
cout << setw(5) << left << (int)nav;
cout << setw(20) << left << "AV Processor";
cout << setw(15) << left << fixed << setprecision(2) << upAudioVideoProcessor;
cout << setw(15) << left << fixed << setprecision(2) << pav << endl;
cout << setw(15) << left << "SUBTOTAL";
cout << setw(15) << left << fixed << setprecision(2) << tp << endl;
cout << setw(15) << left << "TAX";
cout << setw(15) << left << fixed << setprecision(2) << taxrate << endl;
double ttp = tp + 0.0875 * tp;
cout << setw(15) << left << "Total";
cout << setw(15) << left << fixed << setprecision(2) << ttp << endl;
return 0;
}
Which three statements about RSTP edge ports are true? (Choose three.) Group of answer choices If an edge port receives a BPDU, it becomes a normal spanning-tree port. Edge ports never generate topology change notifications (TCNs) when the port transitions to a disabled or enabled status. Edge ports can have another switch connected to them as long as the link is operating in full duplex. Edge ports immediately transition to learning mode and then forwarding mode when enabled. Edge ports function similarly to UplinkFast ports. Edge ports should never connect to another switch.
Answer:
Edge ports should never connect to another switch. If an edge port receives a BPDU, it becomes a normal spanning-tree port. Edge ports never generate topology change notifications (TCNs) when the port transitions to a disabled or enabled status.In C++ please.
If the hypotenuse and one leg of a right triangle are equal to the hypotenuse and one leg of another right triangle, then the two right triangles are congruent.Assume that you are given a function called rightTriangle. It takes three sides of a triangle (the third parameter is the largest, so it will be the hypotenuse if the triangle is a right triangle) and returns true if the triangle is a right triangle and false otherwise. YOU DO NOT HAVE to WRITE THIS FUNCTION. YOU HAVE IT!Also assume that you have a function called equalNums. It takes 4 parameters, if the first 2 are == to the last 2, the function returns false, otherwise the function returns true. So if we send it 3 5 3 5 the function returns true. You do not have to write this function, you have it!Assume that the following variables are declared for two triangles and have values and we know that the 3rd side is the largest side:int triangle1Side1, triangle1Side2, triangle1Side3;int triangle2Side1, triangle2Side2, triangle2Side3;1. Write code in main (using the two functions that you have) to print out whether of not these two triangles are right congruent triangles. (remember that to be right congruent triangles, both triangles need to be right triangles and the hypotenuse and leg of one need to be == to the hypontenuse and leg of the other).
Answer:
Following are the code to this question:
#include <iostream>//defining header file
using namespace std;
bool rightTriangle(int s1,int s2,int s3) //defining method rightTriangle
{
int t1,t2,t3; //defining integer variables
t1 = s1*s1; // multiplying side value and store it into declaring integer variables
t2 = s2*s2; // multiplying side value and store it into declaring integer variables
t3 = s3*s3; // multiplying side value and store it into declaring integer variables
if(t3 == t1+t2)//use if block to check Pythagoras theorem
{
return true; //return true
}
else //else block
{
return false; //return false
}
}
bool equalNums(int n1,int n2,int n3,int n4) //defining method equalNums
{
if(n1==n3 && n2==n4) //defining if block that checks
{
return true;//return value true
}
else //else block
{
return false; //return value false
}
}
int main()//defining main method
{
int t1=3,t2=4,t3=5,t11=3,t12=4,t13=5; //declaring integer varibles and assign value
int check=0; //defining integer varible check that checks values
if(rightTriangle(t1,t2,t3)&&rightTriangle(t11,t12,t13)) //defining codition to check value using and gate
{
if(equalNums(t1,t3,t11,t13) || equalNums(t2,t3,t12,t13)) // defining conditions to check value using or gate
check = 1; //if both conditions are true
}
if(check==1) //if block to check value is equal to 1
{
cout << "Right Congruent Triangles"; //print message
}
else//else block
{
cout << "Not Right Congruent Triangles";//print message
}
}
Output:
Right Congruent Triangles
Explanation:
In the above-given code, a boolean method "rightTriangle" is declared, in which it accepts three integer variable "s1, s2, and s3" as a parameter, inside the method three another variable "t1, t2, and t3" is declared, in which parameter stores its square value. In the next line, a conditional statement is declared that checks the "Pythagoras theorem" value and returns its value. In the next step, another method "equalNums" is declared, that accepts four integer parameter "n1, n2, n3, and n4", inside the method a conditional statement is used that uses an operator to check n1, n3, and n2, n4 value if it is true it will return true value else it will return false. Inside the main method, integer variable and a check variable is defined that uses the if block to passes the value into the method and checks its return value is equal if all the value is true it will print the message "Right Congruent Triangles" else "Not Right Congruent Triangles".what term defines inventiveness uncertainty and futuristic ideas typically deals with science and technology
Answer:
Innovation.
Explanation:
Innovation can be considered the ideal term, because an innovative idea arises from the set of a new technique, method or invention that aims to improve an existing method, standard, or product.
However, added to an innovative idea is the risk, since innovation breaks an already established standard, so it is through science and technology that an invention will gain greater foundation and recognition, which increases its credibility and acceptance.
Joe, Kate and Jody are members of the same family. Kate is 5 years older than Joe. Jody is 6 years older than Kate . The sum of their ages squared is 961 years. What are their ages?
Answer:
5, 10 and 16
Explanation:
The sum of their ages is √961 = 31
If Joe is x years old, the equation that follows is:
x + (x+5) + (x+5+6) = 31
This simplifies to
3x = 31 - 11 - 5 = 15
so x=5
From that you can find
Joe = x = 5
Kate = x+5 = 10
Jody = x+5+6 = 16
What is one word for inventiveness uncertainty and futuristic
Answer:
Experimental
Explanation:
In C++ programming please.
Rock, Paper, Scissors Game.
a) Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:
1. When the program begins, a random number in the range of 1 through 3 is generated (1+rand()%3). If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, them the computer has chosen scissors. (Don't display computer's choice yet).
2. The user enters his or her choice of "rock", "paper", or "scissors" at the keyboard. (You can use a menu if you prefer).
3. The computer's choice is displayed.
4. A winner is selected according to the rock paper scossors game riles.
Be sure to divide the program into the following functions:
int getUserChoice ();
The getUserChoice function displays a menu allowing the user to select rock, paper, or scissors.
4 to Quit the game
The function then returns 1 for rock, or 2 for paper, or 3 for scissors.
User input validation of the choices
int getComputerSchoice ();
The getComputerChoice function returns the computer's game choice.
It returns 1 for rock (via the ROCK constant), or 2 for paper (via the PAPER constant), or 3 for scissors
determineWinner (int, int);
The determineWinner function accepts the user's game choice and the computer's game choice as arguments and displays the choices, and a message indicating the winner.
void displayChoice (int);
The displayChoice function accepts an integer argument and displays rock, paper, or Scissors.
int main ()
Loop while user choice is not 4 (Quit the game)
Answer:
A program was written in C++ that allows the user to play the game of Rock, Paper, Scissors against the computer.
Explanation:
Solution
C++ CODE:
#include<iostream>
#include <locale>
#include<string>
#include<cstdlib>
#include<time.h>
using namespace std;
int play(int user,int cpu){
return(user - cpu); //here is just substracting and returning the value entered by user and cpu
}
void display(int choice){ //to display the choices entered by user or cpu
if(choice == 1){ //1 for Rock
cout<<"Rock"<<endl;
}else if(choice == 2){ //2 for Paper
cout<<"Paper"<<endl;
}else{ //3 for Scissors
cout<<"Scissors"<<endl;
}
}
void winner(int win){
if(win == 0){ //if user and cpu entered same value
cout<<"A game is a draw."<<endl;
}else if(win == 1){ //if user entered Paper and cpu entered Rock or if user entered Scissors and cpu entered Paper
cout<<"Hurray You won."<<endl;
}else if(win == -1){ //if user entered Rock and cpu entered Paper or if user entered Paper and cpu entered Scissors
cout<<"CPU won."<<endl;
}else if(win == 2){ //if user entered Scissors and cpu entered Rock
cout<<"CPU won."<<endl;
}else if(win == -2){ //if user entered Rock and cpu entered Scissors
cout<<"Hurray You won."<<endl;
}
}
int cpu_choice(){
srand (time(NULL)); //this function is to generate random from time to time
int cpu = 1000;
while(cpu > 3){ //to generate random number between 1 to 3
cpu = (rand() % cpu) +1;
}
return cpu;
}
int main(){
int choice=0,cpu=0,win=0;
locale loc;
string ch;
cout<<"Enter your choice :"<<endl;
cout<<"1. Rock\n2. Paper\n3. Scissors"<<endl<<"\t";
cin>>ch;ch[0] = toupper(ch[0],loc); //converting the first element to char if by misktake the user have entered lower case
if(ch.compare("Rock") == 0 || ch.compare("Paper") == 0 || ch.compare("Scissors") == 0){ //if choice is correct
cout<<"You: "<<ch<<endl; //display the choice entered by the user
if(ch[0] == 'r' || ch[0] == 'R') choice = 1; //if the user enter rock or Rock
else if(ch[0] == 'p' || ch[0] == 'P') choice = 2; //if the user enter paper or Paper
else if(ch[0] == 's' || ch[0] == 'S') choice = 3; //if the user enter scissors or Scissors
cout<<"CPU: ";
cpu = cpu_choice(); //get cpu choice
display(cpu); //display the choice entered by the cpu using the random number
win = play(choice,cpu); //call the function to play the game and returns the winner
winner(win); //display the winner
}else{ //if entered choice is wrong
cout<<"wrong choice!"<<endl;
}
return 0;
}
as a sales person which size hard disc would you recommend a customer who needs to use Microsoft PowerPoint application?
Answer:
Not very big - maybe 64 GB or 128 GB
Explanation:
PPT doesn't take up much space
Write a class named Car that has the following fields: yearMode1. The yearModel field is an int that holds the car's year model. make. The make field is a String object that holds the make of the car, such as "Ford" "Chevrolet", "Honda", etc. speed. The speed field is an int that holds the car's current speed. In addition, the class should have the following methods . Constructor. The constructor should accept the car's year model and make as ments. These values should be assigned to the object's yearModel and make fields. The constructor should also assign 0 to the speed field. Accessor. The appropriate accessor methods get the values stored in an object's yearModel, make, and speed fields. , accelerate. The accelerate method should add 5 to the speed field each time it is called _________. brake. The brake method should subtract 5 from the speed field each time it is called.
//Write the class definition for the class Car
public class Car {
//Declare the instance variables(fields)
int yearModel;
String make;
int speed;
//Declare the constructor: Make sure the constructor has
//the same name as the name of the class - Car.
//The constructor receives two parameters - yearModel and make.
//The parameters are then assigned to their respective fields.
//The speed field is given a value of zero.
public Car(int yearModel, String make){
this.yearModel = yearModel;
this.make = make;
this.speed = 0;
}
//Accessor method - get - for the yearModel
//returns the yearModel of the car
public int getYearModel() {
return yearModel;
}
//Accessor method - get - for the make
//returns the make of the car
public String getMake() {
return make;
}
//Accessor method - get- for the speed
//returns the speed of the car
public int getSpeed() {
return speed;
}
//Method accelerate() to increase the speed of the car by 5
//each time it is called
public void accelerate(){
this.speed += 5;
}
//Method brake() to decrease the speed of the car by 5
//each time it is called
public void brake(){
this.speed -= 5;
}
} //End of class declaration
Explanation:The code above has been written in Java. It contains comments explaining the code. Please go through the comments. The actual lines of code that are executable are written in bold-face to distinguish them from the comments.
Consider the code fragment below. Show the values stored at each location in memory and as they change while the code executes. Use the memory addresses given in the comments following each statement. Assume all integer and pointer sizes are four bytes and each box in the memory representation is 4 bytes.
int x; // x is at memory address 5000
int *y; // *y is at memory address 5004
int *z; // *z is at memory address 5008
int *a; // a is at memory address 5012
z=&x;
y=malloc(5 * sizeof(int)); // malloc returns
// address 6000
X = 10;
y[1] = 15;
y[2] = *z; x=*(y + 1);
a = malloc(sizeof(int)); // malloc returns // address 6020
*a = *y; a = z; *z= 25; *a = 12; y[3] = *z; y[4] = x; y[0] = x;
Answer:
see explaination
Explanation:
Final value :-
Memory => value = reference in code
5000 => 12 = x
5004 => 6000 = *y
5008 => 5000 = *z
5012 => 5000 = *a
6000 => 12 = y[0]
6004 => 15 = y[1]
6008 => 10 = y[2]
6012 => 12 = y[3]
6016 => 12 = y[4]
6020 =>
In this lab, you will design a die game called 15. The object of the game is to score exactly 15 points in as few rolls of the die as possible. After each roll, the player can choose to add the current die value to his or her score or not, unless the die value is six, in which case it is automatically added to the player’s score. If the player’s score exceeds 15, the player loses. If the player’s score is equal to 15, the player wins. Play continues until the player reaches or exceeds 15 points.
Description:
To start the game, the player presses the reset switch. The score will be set to zero and both the Win and Lose LEDs will be turned off. The player then rolls the die by toggling the Rb switch to the Roll position. The die counter should operate with a clock frequency of 27 MHz or 50 MHz so that the player cannot control the outcome of a roll. After about a second or more, the player toggles the Rb switch back to the Off position to end the roll. The Turn Counter should be incremented to indicate that the player has taken a roll. If the player rolled a six, it is automatically added to his or her score. Otherwise, the player can press the Add button to add the die value to his or her score or the player can press the Pass button to leave the score unchanged. After each roll, the score will be greater than, less than or equal to 15. If the score is equal to 15, the player wins – the Win LED should be turned on and remain on until the system is reset for a new game. If the score is greater than 15, the player loses – the Lose LED should be turned on and remain on until the system is reset. Once the player has won or lost, the player cannot roll the die again until the system is reset. (The Rb switch will not have any effect in these states.) If the score is less than 15, the player will roll again. After each roll, the player presses either the Add button or the Pass button (unless a six is rolled) before the die can be rolled again. Play continues until the player’s score equals or exceeds 15.
1) Draw a state diagram for the game as a Moore finite state machine.
2) Draw a state diagram for the game as a Mealy finite state machine.
Answer:
Explanation:
Check the file attached below to see the diagram that is drawn for the question being answered
In order to ensure optimal database performance, the logical and physical design should consider the user requirements thoroughly. Suppose you have been hired to transform a conceptual model into a logical model for a sales database. Describe the specific steps that you must perform in order to appropriately construct the database model. For each step mentioned, speculate the risks that might present themselves and how you would avoid or mitigate those risks.
Answer:
(1). IDENTIFY THE ENTITIES.
(2). IDENTIFY RELATIONSHIPS.
(3). IDENTIFY ATTRIBUTES.
(4). DEFINE DATATYPE FOT THE ATTRIBUTES.
(5). NORMALIZATION.
Explanation:
There are three levels to data modeling when we are considering designing a database for optimal database performance and they are logical data modeling, conceptual data modeling and physical data modeling.
(1). IMPORTANT FEATURES NEEDED IN LOGICAL DATA MODELING:
- entity names.
- attributes.
- foreign key.
- primary key.
(2). IMPORTANT FEATURES NEEDED CONCEPTUAL DATA MODELING:
- entity relationships.
- entity names.
For complexity sake, always start with THE CONCEPTUAL DATA MODELING (least complex).
The following steps can be used in CONSTRUCTION OF DATABASE MODEL.
(1). IDENTIFY THE ENTITIES: Identify entities such as the events, people and so on.
The RISK=> efficient identification of entities such as events, location, people has to occur.
(2). IDENTIFY RELATIONSHIPS: check for relationships such as customers to sales, customers to shops and many more.
The RISK=> it must be arranged in definite order.
(3). IDENTIFY ATTRIBUTES: check for attributes such as address, names and so on.
(4). DEFINE DATATYPE FOT THE ATTRIBUTES: Datatypes should be define for the attributes that was Identifed.
(5). NORMALIZATION: which may include first, second and third.
SUMMARY: database modeling involves the following; domain, functionality, entities, relationships and design.
RISKS TO AVOID IN DATABASE MODELING;
- analysis of the basic requirements.
- users should be given specifications.
- change should be checked in business.
A potential danger of social media is that
Answer: information can be viewed my strangers
Explanation:
Apex