Answer:
a) 255
b) 61602
c)
d)
Explanation:
You need to understand the decimal equivalent of hexadecimal numbers, from 0 to 9 numbers are represented the same way, from 10 to 15 we use the alphabet, meaning 10 equals A in hexadecimal base, 11-B, 12-C, 13-D, 14-E, and 15-F.
For your first exercise you'll enumerate the number's positions fromright to lef begining with 0:
a. F F
position 1 0
Now you'll multiply your hexadecimal number (using the decimal equivalent for your letters) for the base (16) elevated to the number of the position:
[tex]F*16^{0}=15*1=15\\F*16^{1}=15*16=240[/tex]
Finally, you'll add your results:
240+15=255
FF=255
b. F 0 A 2
position 3 2 1 0
[tex]2*16^{0}=2*1=2\\A*16^{1}=10*16=160\\0*16^{2}=0*256=0\\F*16^{3}=16*4096=61440\\\\2+160+0+61440=61602\\[/tex]
F0A2=61602
c. F 1 0 0
position 3 2 1 0
[tex]0*16^{0}=0*1=0\\0*16^{1}=0*16=0\\1*16^{2}=1*256=256\\F*16^{3}=16*4096=61440\\0+0+256+61440=61696\\[/tex]
0F100=61696
d. 1 0 0
position 2 1 0
[tex]0*16^{0}=0*1=0\\0*16^{1}=0*16=0\\1*16^{2}=1*256=256\\\\0+0+256=256\\[/tex]
100=256
I hope you find this information useful! Good luck!
Hexadecimal to decimal conversion is done by multiplying each digit by 16 raised to the power of its position. For example, FF in hexadecimal converts to 255 in decimal, and F0A2 converts to 61602.
Explanation:To convert hexadecimal numbers to decimal, we have to understand that hexadecimal is a base-16 number system, which means each digit represents a power of 16. Each digit is multiplied by 16 raised to the power of the position and then summed. The most right-hand position is raised to the power of 0, moving left, the next position is raised to the power of 1, and so on.
(a) FF in hex is 15*16^1 + 15*16^0 = 240 + 15 = 255 in decimal.(b) F0A2 in hex is 15*16^3 + 0*16^2 + 10*16^1 + 2*16^0 = 61440 + 0 + 160 + 2 = 61602 in decimal.(c) 0F100 in hex is 0*16^4 + 15*16^3 + 1*16^2 + 0*16^1 + 0*16^0 = 0 + 61440 + 256 + 0 + 0 = 61696 in decimal.(d) 100 in hex is 1*16^2 + 0*16^1 + 0*16^0 = 256 + 0 + 0 = 256 in decimal.Write Java code to implement the Euclidean algorithm for finding the greatest common factor of two positive integers.Must use recursion!
Answer:
/* here is code in java to find greatest common
divisor with Euclidean algorithm */
import java.util.*;
// class definition
class Main
{
// recursive method to find gcd
public static int Euclidean(int nm1, int nm2)
{
// base case
if (nm1 == 0)
return nm2;
// recursive call
return Euclidean(nm2 % nm1, nm1);
}
// driver method
public static void main (String[] args) throws java.lang.Exception
{
try{
// scanner object to read input
Scanner scr=new Scanner(System.in);
System.out.print("enter first number:");
// read first number
int n1=scr.nextInt();
System.out.print("enter second number:");
//read second number
int n2=scr.nextInt();
// call the method and print the gcd
System.out.println("greatest common factor of both number is: "+Euclidean(n1,n2));
}catch(Exception ex){
return;}
}
}
Explanation:
Read two number from user with scanner object and assign them to variables "n1" & "n2". Call the method Euclidean() with parameter "nm1"& "nm2".According to Euclidean algorithm, if we subtract smaller number from the larger one the gcd will not change.Keep subtracting the smaller one then we find the gcd of both the numbers.So the function Euclidean() will return the gcd of both the numbers.
Output:
enter first number:12
enter second number:39
greatest common factor of both number is: 3
When we want to remove an element from an array, and have the removed element available for our usage, this is called.
pulling
discarding
appending
popping
Answer:
Popping.
Explanation:
When remove an element from an array and the element is available for our usage is called popping.pop() is a function in function in javascript arrays.The pop() function in javascript removes the last element from the array and return the value of the popped element so it is available for usage.
Hence the answer is popping.
Why is String final in Java?
Answer:
string objects are cached in string pool.
Explanation:
Strings in Java are immutable or final because the string objects are cached in String Pool.As we know multiple clients share the string literals so there exists a risk of one client's action affecting all other clients.
For ex:-The value of string is "Roast" and client changed it to "ROAST" so all other clients will see ROAST instead of Roast.
What is ‘Black-Box’ testing?
Answer:
Black-box testing is the technique which is basically use to reduce the number of the possible cases of the test and also maintain the test coverage. This type of testing is used in the functional and the non functional requirement of the system.
It is type of testing that majorly focus on the functional requirement. There are many types of black box testing that are:
BVA (Boundary value analysis)Error guessingDecision table testing
The first step in building a sequence diagram is to _____. (Points : 6) analyze the use case
identify which objects will participate
set the lifeline for each object
add the focus of control to each object's lifeline
Answer: Set the lifeline of each object
Explanation:
The sequence diagram is the efficient way that use in the system requirement document for the system design.
The sequence diagram is useful in many system that shows the interaction of the logic between the each object in the system.
The first step for building the sequence diagram is that set the lifeline of the each object in the system and it allow the main specification in the run time scenarios in the graphical manner. Therefore, it enhance the performance of the system.
Write a program that asks the user to enter five different, integer numbers. The program then reports the largest number and the smallest number.
Use the if statement, but no loops.
Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
int minn=INT_MAX;
int maxx=INT_MIN;
int n1,n2,n3,n4,n5;
cout<<"enter five Numbers:";
//read 5 Numbers
cin>>n1>>n2>>n3>>n4>>n5;
// find maximum
if(n1>maxx)
maxx=n1;
if(n2>maxx)
maxx=n2;
if(n3>maxx)
maxx=n3;
if(n4>maxx)
maxx=n4;
if(n5>maxx)
maxx=n5;
// find minimum
if(n1<minn)
minn=n1;
if(n2<minn)
minn=n2;
if(n3<minn)
minn=n3;
if(n4<minn)
minn=n4;
if(n5<minn)
minn=n5;
// print maximum and minimum
cout<<"maximum of five numbers is: "<<maxx<<endl;
cout<<"minimum of five numbers is: "<<minn<<endl;
return 0;
}
Explanation:
Declare two variables "minn" & "maxx" and initialize them with INT_MAX and INT_MIN respectively.Then read the five number from user and compare it with "minn" & "maxx" ,if input is greater than "maxx" then update "maxx" or if input is less than "minn" then update the "minn". After all the inputs, "minn" will have smallest and "maxx" will have largest value.
enter five Numbers:5 78 43 55 12
maximum of five numbers is: 78
minimum of five numbers is: 5
Convert (123)5 to hexadecimal.
Answer:
[tex]26_{16}[/tex]
Explanation:
We can obtain the hexadecimal value using an indirected way, first we will convert it to decimal:
[tex](1*5^2+2*5^1+3*5^0)=38_{10}[/tex]
having the decimal number we have to divide that number multiple times by 16 and get a record of the quotient and reminder, until the quotient is equal to zero.
[tex]38| 16[/tex]
[tex]quotient_1=2\\remainder_1=6[/tex]
[tex]2| 16[/tex]
[tex]quotient_2=0\\remainder_2=2[/tex]
Now we will take the remainders and get the hexadecimal value and put them together. (remember, the hexadecimal number are defined from 0 to F, being A=10, B=11, C=12, D=13, E=14, F=15)
[tex]remainder_1=6\\hex_1=6[/tex]
[tex]remainder_2=2\\hex_2=2[/tex]
The hexadecimal number is 26
What is a foreign key and how does it provide referential integrity?
Answer:
By definition a foreign key of table A is a primary key of another table B, thereby establishing a link between them.
To provide referential integrity you can use these referential actions:
Cascade: If rows in table B are deleted, the matching foreign key columns in table A are deleted. Set Null: If rows in table B are deleted, the matching foreign key columns in table A are set to null. Set Default: If rows in table B are deleted, the matching foreign key columns in table A are set with the default value of the column. Restrict: A value in table B cannot be deleted or updated while as it is referred to by a foreign key in table A. Which one is the fastest? (Points : 4) TTL
CMOS
ECL
They are the same
Answer: ECL
Explanation:
ECL is basically stand for the emitter coupled logic and it is the high speed integrated logic circuit. In this ECL logic circuit, the transistor does not enter in the saturation mode.
In the emitter coupled logic, the output resistance are low and the input emitter impedance are high so, the state of the transistor are get changes quickly. Hence, it is fastest device as compared to all other options.
Therefore, ECL is the correct option.
Write a C program that prints the numbers from 1 to 100, but substitutes the word "fizz" if the number is evenly divisble by 3, and "buzz" if the number is divisible by 5, and if divisible by both prints "fizz buzz" like this: 13 1 14 2 fizz 4 buzz fizz 7 fizz buzz 16 17 fizz 8 fizz buzz 19 buzz ... 11 fizz and so on
Answer:
// here is code in C.
#include <stdio.h>
int main(void) {
int num;
// loop run 100 times
for(num=1;num<=100;num++)
{
//check divisibility by 3 and 5
if(num%15==0)
{
printf("fizz buzz ");
}
// check divisibility by 5 only
else if(num%5==0)
{
printf("buzz ");
}
// check divisibility by 3 only
else if(num%3==0)
{
printf("fizz ");
}
else{
printf("%d ",num);
}
}
return 0;
}
Explanation:
Run a for loop from 1 to 100. Check the divisibility of number by 15, if it is divisible print "fizz buzz", if it is not then Check the divisibility by 5 only.if it returns true then print "buzz". if not then check for 3 only,if returns true, print "fizz". else print the number only.
Output:
1 2 fizz 4 buzz fizz ........buzz fizz 97 98 fizz buzz
Which of the following is NOT a good idea to do after you change the root password?
(a) Restart the MySQL Service.
(b) Write down the new password in a safe place.
(c) Keep the change password file on the server in case you need to change the password again.
Answer:
C) Keep the change password file on the server in case you need to change the password again
. You have implemented file permissions on a file so that unauthorized persons cannot modify the file. Which of the following security goals has been fulfilled? A. Accountability B. Privacy C. Integrity D. Accountability
Answer: C)Integrity
Explanation: Integrity is the function that maintains the completeness and originality of information.It assures that the data is not manipulated or modified through any unauthorized access.This helps in keeping the system and data accurate.
Other options are incorrect because accountability is referred as the liability and privacy is only selected user can access the data but they can modify it.Thus, the correct option is option(c) .
how to import any csv from internet in phyton 3 and R ?
Answer:
Jgthj
Explanation:
T to it t urd864rb. I5f. 8rfb 75gj
____ coordinates activities related to the Internet’s naming system, such as IP address allocation and domain name management. National Center for Supercomputing Applications (NCSA) Web Consortium (W3C) ICANN (Internet Corporation for Assigned Names and Numbers) Internet Society (ISOC)
Answer: ICANN (Internet Corporation for Assigned Names and Numbers)
Explanation: ICANN (Internet Corporation for Assigned Names and Numbers) is the a US base government organization which runs on the non-profit scheme. The function of the ICANN is to maintain stability of internet operation and function,process based on consensus ,managing the domain name, naming internet components etc.
Other options are incorrect because National Center for Supercomputing Applications (NCSA) is for supporting and providing powerful computer, Web Consortium (W3C) is for development of standard of web and Internet Society (ISOC) works for internet based standard for development.
Write a program that will ask the user to enter personal information and then will display it back to the user.
First, the program will ask the user to enter name. Then it will ask the user to enter address. Then it will ask the user to enter phone number. Then it will ask the user to enter email. At the end, it will display the user
Final answer:
A simple Python program prompts the user to enter personal information such as name, address, phone number, and email, then displays it back. It's essential to handle personal data responsibly and to check privacy policies in real applications.
Explanation:
The question is asking for a simple program that collects and displays personal information. Here is an example of how such a program can be written in Python:
# Ask for personal information
name = input('Please enter your name: ')
address = input('Please enter your address: ')
phone_number = input('Please enter your phone number: ')
email = input('Please enter your email: ')
# Display the information back to the user
print('\nHere is the information you entered:')
print('Name:', name)
print('Address:', address)
print('Phone Number:', phone_number)
print('Email:', email)
This program will prompt the user to enter their name, address, phone number, and email. It will then display this information back to the user. Remember to handle personal information responsibly and refer to privacy policies when handling such data in real applications.
Another ball dropped from a tower A ball is again dropped from a tower of height h with initial velocity zero. Write a program that asks the user to enter the height in meters of the tower and then calculates and prints the time the ball takes until it hits the ground, ignoring air resistance. Use your program to calculate the time for a ball dropped from a 100 m high tower
Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variable
double height;
// gravitational acceleration
double g=9.8;
cout<<"Please enter initial height:";
cin>>height;
// h=ut+(gt^2)/2
// here u, initial velocity is 0
// after simplification
double t=sqrt(2*height/g);
// print the time
cout<<"time taken by ball to hit the ground is:"<<t<<" seconds"<<endl;
return 0;
}
Explanation:
Read the initial height from user. Declare and initialize the earth gravitational acceleration "g=9.8" .Then the equation is h=ut+(gt^2)/2, here u is initial velocity which is 0.Then after simplify the equation t=sqrt(2*h/g). Put the values in the equation and find the time taken by ball to hit the ground.
Output:
Please enter initial height:100
time taken by ball to hit the ground is:4.51754 seconds
Final answer:
A Python program calculates the time a ball takes to reach the ground when dropped from a given height, illustrating basic principles of free fall in physics. For a 100 m tower, the time is approximately 4.51 seconds.
Explanation:
A student has asked to write a program that computes the time it takes for a ball to hit the ground when dropped from a tower of height h meters, assuming no air resistance. The formula to calculate the time t is derived from physics: t = √(2h/g), where g is the acceleration due to gravity, approximately 9.81 m/s². Using this formula, we candevelop a program in Python to ask the user for the height h and then compute and print the time t. To demonstrate, if the program is used with a tower height of 100 meters, the calculated time for the ball to reach the ground would be approximately 4.51 seconds.
Example Python Program
import math
def drop_time_from_height(height):
g = 9.81 # Gravity in m/s²
time = math.sqrt(2 * height / g)
return time
height = float(input("Enter the height of the tower in meters: "))
time = drop_time_from_height(height)
print("The ball takes", round(time, 2), "seconds to hit the ground.")
This program illustrates a straightforward approach to solving problems related to free fall and physics calculations, enhancing the understanding of concepts such as gravity and acceleration.
Write a program to calculate the number of seconds since midnight. For example, suppose the time is 1:02:05 AM. Since there are 3600 seconds per hour and 60 seconds per minutes, it has been 3725 seconds since midnight (3600 * 1 + 2 * 60 + 5 = 3725). The program asks the user to enter 4 pieces of information: hour, minute, second, and AM/PM. The program will calculate and display the number of seconds since midnight. [Hint: be very careful when the hour is 12].
Answer:
// here is code in c++.
#include <bits/stdc++.h>
using namespace std;
int main()
{
// variables
int hour,min,sec,tot_sec;
string str,s="AM";
cout<<"enter number of hours:";
// read hour
cin>>hour;
cout<<"enter number of minutes:";
// read minute
cin>>min;
cout<<"enter number of seconds:";
// read seconds
cin>>sec;
cout<<"Enter AM or PM:";
// read AM or PM
cin>>str;
if((str.compare(s) == 0 )&& hour==12)
{
hour=0;
}
// calculate total seconds
tot_sec=hour*3600+min*60+sec;
// print the output
cout<<"total seconds since midnight is : "<<tot_sec<<endl;
return 0;
}
Explanation:
Read the value of hour, minute, second and string "AM" or "PM" from user.
Then if string is equal to "AM" then make hour=0.Then multiply hour with
3600, minute with 60 and add them with second.It will give the total seconds
from midnight.
Output:
enter number of hours:12
enter number of minutes:46
enter number of seconds:23
Enter AM or PM:AM
total seconds since midnight is: 2783
Final answer:
The program provided takes user input for hour, minute, second, and period (AM/PM) and calculates the total number of seconds since midnight. Special attention is given to the hour input to correctly adjust for 12-hour time format nuances, ensuring accurate conversion and calculation.
Explanation:
Calculating the number of seconds since midnight involves several steps of time conversion and careful consideration of whether the time is AM or PM, especially in the instance of 12 o'clock. Below is a simple program in Python which prompts the user for the required information and calculates the number of seconds since midnight:
Python Program:
def calculate_seconds(hour, minute, second, period):
if hour == 12:
hour = 0
if period.lower() == 'pm':
hour += 12
total_seconds = (hour * 3600) + (minute * 60) + second
return total_seconds
# User input
hour = int(input('Enter the hour: '))
minute = int(input('Enter the minutes: '))
second = int(input('Enter the seconds: '))
period = input('Enter AM or PM: ')
# Calculation
total_seconds_since_midnight = calculate_seconds(hour, minute, second, period)
print(f'It has been {total_seconds_since_midnight} seconds since midnight.')
This program will correctly convert the given time to the total seconds since midnight using the entered hour, minute, and second values, along with the period of the day.
A(n) _____ of an class is where the services or behaviors of the class is defined. (Points : 6) operation
attribute
class
object
abstract class
Answer:
Operation the correct answer for the given question.
Explanation:
An operation is a template that is used as a template parameter .An operation defined the services and behaviors of the class .The operation is directly invoked on instance .
Attribute define the property of an entity it is not defined the services and behaviors of the class. so this option is incorrect.
Class is the class of variable of method it is not defined the services and behaviors of the class so this option is incorrect.
Object are the rub time entity .object are used access the property of a class it is not defined the services and behaviors of the class so this option is incorrect.
Abstract class is the class which have not full implementation of all the method .it is not defined the services and behaviors of the class so this option is incorrect.
So the correct answer is operation.
The answer to the question is the 'operation' of a class, where the behaviors or services are defined. Operations, also known as methods, are what allow objects of a class to perform actions and interact with other parts of a program. They are distinguished from attributes, which define a class's properties.
A operation of a class is where the services or behaviors of the class are defined. In object-oriented programming, a class is a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods, in other words, operations). The operations are essential to the functionality of a class as they enable the objects of that class to perform tasks and respond to messages.
Operations, which can also be referred to as methods or functions, define what actions can be performed on the data within an object. While attributes determine the properties and characteristics of a class instance, it is the operations that define how an instance of a class can interact with other parts of the program.
Consider a simple example of a class 'Car'. The attributes of the 'Car' class might include 'color', 'brand', and 'horsepower', but the operations might include 'startEngine()', 'stopEngine()', and 'accelerate()'. These operations are the behaviors that the 'Car' objects can exhibit.
Which of the following statements is/are true? (Points : 5) A. A default constructor is automatically created for you if you do not define one.
B. A static method of a class can access non-static members of the class directly.
C. An important consideration when designing a class is identifying the audience, or users, of the class.
None of the above
Only A and C
Answer: Only A and C
Explanation: Default constructor is a constructor that has parameters with the values that are default or has no arguments/parameter present. Default constructor is not declared in the class rather it gets generated by itself when not defined.
Class is defined with data members, functions, objects etc are considered as per the requirement given by the user .It is the user defined concept.
Statement (B) is incorrect because static method is used for accessing the static members of the particular class and manipulate the value of it.
Thus, only statement (A) and (C) are correct.
Explain what happens if you try to open a file for reading that does not exist.
Answer:
Exception is thrown and the file is created with 0 length.
Explanation:
While opening a file there is an error occur which shows the file does not exist that means an exception is thrown.
And this error can be occur when the size of the file is very very low means the file is a size of 0 length. So to avoid this error we have to exceed its length from the zero length.
In your opinion, what are the Pros and Cons of employers using Video Surveillance?
Answer: Video surveillance is the digital system used in the organization for the capturing of the video and storing it for monitoring .It is used for the security purpose of the business. The pros and cons of this system is mentioned as follows:-
Pros:
Providing security in business field Decrements in the crime rateProvides 24x7 monitoring and surveillanceServing real -time informationCons:
Costly investmentNeeds more devices for installation in large organizationsCreated privacy concernsOverloading of data storage in the form video can happen
Final answer:
Pros of employers using video surveillance include increased security and monitoring productivity. Cons include invasion of privacy and the potential for misuse by employers.
Explanation:
Pros:
Increased security: Video surveillance can help deter theft, vandalism, and other crimes in the workplace.Monitoring productivity: Employers can use video surveillance to ensure employees are working efficiently and following company guidelines.Evidence in legal matters: Video footage can serve as evidence in workplace disputes, accidents, or criminal activities.Cons:
Invasion of privacy: Video surveillance can infringe on employees' privacy rights and create a sense of constant monitoring.Potential for misuse: Employers may abuse video surveillance by using it for purposes other than security and surveillance.Employee morale: Constant video surveillance may create a negative work environment and lower employee morale.What is character referencing and why is it used?
Answer: Character reference is the tool usually followed in the business world.It is defined as the recommendation that is provided by organization employee that has a relation with the candidate(individual) outside of the work. This also known as the personal reference. The candidate can be friend family or any other known person whose reference is being given.
This is used in the business field for revealing about the personality and character of the candidate apart from the skills and working abilities. It also helps in the hiring of the candidate easily when the description is good in the character reference.
Useful open source applications include the popular Web browser Mozilla Firefox, the e-mail application Thunderbird, the relational database management server MySQL, and the powerful programming language ____.
C++
PERL
XML
RPG
Answer:
C++
Explanation:
C ++ is an object-oriented programming language that takes the basis of the C language.
C ++ is a programming language designed in the mid-80s by Bjarne Stroustrup. The intention of its creation was to extend to the successful programming language C with mechanisms that allowed the manipulation of objects. In that sense, from the point of view of object-oriented languages, C ++ is a hybrid language. Subsequently, generic programming facilities were added, which added to the other two paradigms that were already admitted (structured programming and object-oriented programming). This is why it is often said that C ++ is a multiparadigma programming language.
At present, C ++ is a versatile, powerful and general language. His success among professional programmers has led him to occupy the first position as an application development tool. The C ++ maintains the advantages of the C in terms of operator wealth and expressions, flexibility, conciseness and efficiency. In addition, it has eliminated some of the difficulties and limitations of the original C.
Answer:
PERL
Explanation:
PERL (Practical Extraction and Report Language) :This is an Open Source software, that is licensed under its Artistic License, or the GNU General Public License (GPL).
Perl is a popular programming language that carries out a lot of functions and applicable in many applications, it was initially developed for just manipulation of text but is currently being used for a whole lot more, it used for a multiple tasks like web development and network programming.
The "A" in the CIA triad stands for "authenticity". True False
Answer: False, the "A" in the CIA triad stands for availability.
The CIA triad also know as the Confidentiality, integrity and availability triad, is known as a model which is designed in order to implement and enforce policies in regards to information security. This model is also referred as the availability, integrity and confidentiality model i.e AIC triad. This is done in order to avoid confusion with Central Intelligence Agency i.e. CIA.
By default, client DHCPv6 messages are sent using _____ scope. (Points : 3) the anycast address
router's prefix
the link-local
FF02::0A
None of the above
Answer: Router's prefix
Explanation: DHCPv6 (Dynamic host configuration protocol version 6) is the protocol used for an IPv6(Internet protocol version 6) network's host,prefixes,address and other such configurations.The prefix is used for sending the messages of DHCPv6 in the default situation.
In default situation the prefix acts as the cluster of the IP address and thus sends the the message to the destination using the address. Other options are incorrect because anycast address, local link and FF02::0A does not transmit the message in the default situation.Thus the correct option is router's prefix.
A functional policy declares an organization's management direction for security in such specific functional areas as email, remote access, and Internet surfing.
True
False
Answer: True
Explanation:
Functional policies are referred to as a system or units of standardized procedures, processes and guidelines for employees which tends to state how exactly an employee has to provide services and commodities. The stages to go undergo this are usually formalized in organizations guide which usually will describe the respective processes. It also lies as the ground of franchising and thus tend to guarantee both the adherence to the process and the accomplishment of standards set .
List at least three benefits of automated testing?
Answer:
Always available to run: You can run the tests 24/7, when you are at work, when you leave the office or if you working remote, you can run the test. They can be run virtually unattended, leaving the results to be monitored towards the end of the process.
Fewer human resources: You can reduce the people advocated on testing, you would need a QA automation to write your scripts to automate your tests, instead of people doing manual tests. In addition, once automated, the test library execution is faster and runs longer than manual testing.
Reusability and reliability: The scripts are reusable, a script could be used hundreds of times before need changes. It allows you to test exactly the same, without forgetting any steps this is why is more reliable and way quicker than manual test where people may cause.
Give two separate print statements: one will print your name, the other will print your major. Ensure that both will print on the same line to the screen
Answer:
// here is code in java.
// import package
import java.util.*;
// class definition
class Main
{
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// print the name
System.out.print("my name is Sam. ");
// print the major
System.out.print("my major is CS.");
}catch(Exception ex){
return;}
}
}
Explanation:
In java, System.out.print() will print the statement but didn't go to the next line.If there is another System.out.print(), then it will also print into the same line.So here first the System.out.print() will print the name and second will print the major in the same line.
Output:
my name is Sam. my major is CS.
What are the most important features to consider before purchasing a PC?
Answer: There are several features that should be considered before buying personal computer(PC).Some of the main factors are:-
Capacity of hard-drive is important to determine the storage space of the system so that it can hold data like files, videos , images etc as per the requirement.RAM(Random access memory) and processor of the personal computer is important for the fast processing and execution of the tasks and functionsSize of the personal computer should also be considered as main feature because compact size make it portable otherwise large sized PC are bulky.Brand is also a important feature because some PC and some other gadgets have already established popularity and reliability.Price point is also a must because there are all types of computer available in the market from low to high cost.But the PC should be according to the budget of individual .Convert hexadecimal number 1AF2 to a decimal number.
Answer:
6898
Explanation:
Given that 1AF2 is a hexadecimal number.
We have in hexadecimal, the digits are 0,1,2,3...9, A,B,C,D,E,F for the 16 digits used.
Using the above we say in the given number, we have
2 in units column
F in 16 column
A in 16 square column
and 1 in 16 cube column
Place value[tex]= 2(1) +15(16)+10(16^2)+1(16^3)\\= 2+240+2560+4096\\=6898[/tex]
Hence 1AF2 = 6898 in decimal