Answer:
#! /usr/bin/bash
echo $[$1**$2]
Explanation:
(a) The first line of the code is very important as it tells the interpreter where the bash shell is located on the executing computer.
To get this on your computer, simply:
1. open your command line
2. type the following command: which bash
This will return the location where the bash shell is. In this case, it returned
/usr/bin/bash
(b) The second line is where the actual arithmetic takes place.
The variables $1 and $2 in the square bracket are the first and second arguments passed from the command line. The ** operator raises the left operand (in this case $1) to the power of the second operand (in this case $2).
Then, the echo statement prints out the result.
(c) Save this code in a file named as pow.sh then run it on the command line.
For example, if the following is run on the command line: ./pow.sh 2 3
Then,
the first argument which is 2 is stored in $1 and;
the second argument which is 3 is stored in $2.
The arithmetic operator (**) then performs the arithmetic 2^3 which gives 8.
In the following instruction sequence, show the values of the Carry, Zero, and Sign flags where indicated:_____.
mov al, 00001111b
test al, 00000010b
mov al, 00000110b
cmp al, 00000101b
(Hint: type in your answer as CF = ZF = SF = ___)
Answer:
CF = 0
ZF = 0
SF = 0
Explanation:
Assuming that at the initial stage that all Flag values are = zero
every Instruction sequence will have the values of CF , ZF and SF = 0 respectively
i.e.
CF = 0
ZF = 0
SF = 0
This is because the instruction "mov" in the instruction sequence does not have an effect on the flags. until when the accumulator is loaded with the value zero
Can 7Cs help to develope an effective document?
Answer:
i dont know k srry
Explanation:
computer is classified into how many ?
Answer:
four types
Explanation:
There are four types in the classifications of the computer by size are Supercomputer, Mainframe computer, Minicomputer, and Micro Computer
Answer:
The computer is classified in 4:
Supercomputer
Mainframe computer
Minicomputer
Micro Computer
Explanation:
Consider the following code:
val = 50
def example():
val = 15
print (val)
print (val)
example)
print (val)
What is output?
1.
2.
3.
I got you bro the answer is 50, 15, 5
What should be the first tag in any HTML document? A. <head> B. <title> C. <html> D. <!DOCTYPE >
Answer:
C.
Explanation:
A program contains the following prototype:
int cube( int );
and function:
int cube( int num )
{
return num * num * num;
}
Which of the following is a calling statement for the cube function that will cube the value 4 and save the value that is returned from the function in an integer variable named result (assume that the result variable has been properly declared)?
a. cube( 4 );
b. cube( 4 ) = result;
c. result = cube( int 4 );
d. result = cube( 4 );
Answer:
d. result = cube(4);
Explanation:
Given
Prototype: int cube(int num);
Function: int cube(int num) { return num * num * num; }
Required
The statement to get the cube of 4, saved in result
To do this, we have to call the cube function as follows:
cube(4);
To get the result of the above in variable result, we simply assign cube(4) to result.
So, we have:
result = cube(4);
2. Many successful game companies have adopted this management approach to create successful and creative video games.
a) Creating a creative and fun workspace for employees
b) Offering free lunches and snacks.
c) Having a good design idea to start with.
d) Having enough material and human resources to work with.
Answer:
Having a good design idea to wotk with
Explanation:
Describe Atari and explain how the level of technology available at the time impacted the development of Atari game systems
Answer:
Atari is something that is dangerous .
has led to many bad things to the young ones
Consider a logical address space of 64 pages of 1,024 words each, mapped onto a physical memory of 32 frames. Show your work. You can either type the solution or write
Answer:
Logical address = 16 bits
Physical address = 15 bits
Explanation:
Logical space, number of pages = 64 = 2^6
Word size per page = 1024 = 2^10
Size of logical address :
Number of pages * words per page
2^6 * 2^10 = 2^(6+10) = 2^16 = 16 bits
For the physical address :
Number of frames = 32 = 2^5 frames
Word size = 1024 = 2^10
Number of frames * word size
2^5 * 2^10 = 2^(10+5) = 15 bits
From your finding,conclusion and recommendations can you make on the issue of human rights violations to:Government
Catastrophic injuries and illnesses account for two-thirds of total health care costs in the country of Gnut. The Gnuti government is deciding between two different universal health insurance programs: program X would pay for two-thirds of any health care expense that a Gnuti citizen incurred, while program Y would pay only for catastrophic illnesses and injuries, but would cover 100% of those costs. Which program is likely to better allow Gnuti citizens to smooth consumption
Answer:
In the country of Gnut
The universal health insurance program that is likely to better allow Gnuti citizens to smooth consumption is:
program Y that would pay only for catastrophic illnesses and injuries.
Explanation:
Program Y is a better option for Gnuti citizens to smooth consumption. The reason is that catastrophic injuries and illnesses already account for two-thirds of the total health care costs in the country. These injuries and illnesses cost more income variability to the citizens than other health care expenses. With the government sponsoring program Y, the citizens will be insulated from consumption patterns caused by income variability. Consumption smoothing creates the needed balance between spending and saving during the different life phases for the citizens of Gnut.
What is the answer to the question
Answer:
B. H1
Explanation:
H1 is the largest header in the hierarchy. H6 is the smallest.
Answer:
<h1>Hello</h1>
H1 is bigger
3. In which of the following places can
you always find a 'home page'?
a) at home
b) in a book
c) on the World Wide Web
d) in a printer
Answer:
On the World Wide Web
Explanation:
Sure theres always a homepage somewhere. But i dont know what your researching so i went with c.
12. What separated Grand turismo from other racing games was its focus on ______.
a) Your audiences and females in particular
b) Fantasy graphics and visuals
c) Pure simulation and ultrarealistic features
d) All of the above
Answer:
c) Pure simulation and ultrarealistic features
Explanation:
The main difference between Grand Turismo and other racing games was its focus on Pure simulation and ultrarealistic features. The Grand Turismo series has always been a racing simulation, which was made in order to give players the most realistic racing experience possible. This included hyperrealistic graphics, force feedback, realistic car mechanics, realistic weather, and wheel traction among other features. All of this while other racing games were focusing on the thrill of street racing and modifying cars. Therefore, it managed to set itself apart.
16. The Nintendo Entertainment System (NES) saw its sales skyrocket as a result of the launch of which of the following games?
a) Pac-Man
b) Super Mario Bros
c) The Legend of Zelda
d) Popeye
Answer:
Super Mario bros
Explanation:
Write a program binary.cpp that reads a positive integer and prints all of its binary digits.
Answer:
View image below.
Explanation:
They're just asking you to create a num2bin function on Cpp.
If you search for "num2bin in C", you can find a bunch of answers for this if you think my solution is too confusing.
One way to do it is the way I did it in the picture.
Just copy that function and use it in your program. The rest you can do yourself.
1. It is a technique of creating a picture or pattern by forcing ink or metal on to a surface though a screen of fine material.
Answer:
hmm
Explanation:
I'm pretty sure it's screen painting? it's a print making method that forces ink through fine mesh
Sergio needs to tell his team about some negative feedback from a client. The team has been
working hard on this project, so the feedback may upset them. Which of the following explains
the best way for Sergio to communicate this information?
A) Hold an in person meeting so that he can gauge the team's body language to assess their
reaction
B) Send a memorandum so everyone will have the feedback in writing
C) Hold a video conference so everyone can see and hear about the client's concern without the group witnessing each other's reactions
D) Send an email so everyone will have time to think about the feedback before the next team meeting
Answer: A
Explanation: sergio should do it in person that way he can assess their body language. by doing this, he can tell how the team feels about the feedback
Java Programming
Create a USMoney class with two private integer instance variables named dollars and cents. Add a constructor with two parameters for initializing a USMoney object. The constructor should check that the cents value is between 0 and 99 and, if not, transfer some of the cents to the dollars variable to make it between 0 and 99.
Add a plus() method to the class that takes a USMoney object as its parameter. It creates and returns a new USMoney object representing the sum of the object whose plus() method is being invoked and the parameter. Hint: Your USMoney object may require both a getDollars() method and a getCents() method.
The plus() method does not modify the values of the two existing objects. It should also ensure that the value of the cents instance variable of the new object is between 0 and 99.
For example, if x is a USMoney object with 5 dollars and 80 cents, and if y is a USMoney object with 1 dollar and 90 cents, then x.plus(y) will return a new USMoney object with 7 dollars and 70 cents.
Of course, you will need to create a USMoneyDemo class that tests the USMoney class. Your USMoneyDemo should prompt the user twice. The first to enter an integer representing dollars and the second to enter an integer representing cents. Use these values to create the first object named x. Do it again for the object named y. Do not worry about putting these prompts in a loop for now.
Be sure to add some documentation and put any partner(s) names in the main application's doc box.
For Part 1, submit two files on Blackboard: USMoney.java and USMoneyDemo.java
Part 2 – 25 points
Create a Date class with three private integer instance variables named day, month, year. It has a constructor with three parameters for initializing the instance variables, and it has a method named daysSinceJan1(). Note: It could have other methods.
Just as its identifier suggests, the daysSinceJan1() method computes and returns the number of days since January 1 of the same year, including January 1 and the day in the Date object itself.
Create a DateDemo class that tests the Date class. First prompt the user to enter an integer representing the day, a second prompt to enter an integer representing the month and a third to enter an integer representing the year. (Do not worry about doing any validation of the values entered.) Then, instantiate your Date object with these values. After that, call the method DaysSinceJan1() to display the answer.
An example would be that the user enters values of day = 1, month = 3, and year = 2019, then the call day.daysSinceJan1() should return 60 since there are 60 days between the dates of January 1, 2019, and March 1, 2019. In leap years, it should return 61.
Note that, in a leap year like 2020 will be, there will be one more day counted between January 1 and any date following February 28. What are the rules for leap years? If the year is evenly divisible by four, then it is a leap year...but not always! If it is a century year such as 1900 or 2000, it is only a leap year if evenly divisible by 400. Therefore, the century year 2000 WAS a leap year but 1900 was NOT a leap year! Neither were 1700 or 1800 and neither will be 2100...but 1600 was!
You may NOT use an Array or ArrayList (or any other type of array) and you may not use any of the Java API date classes and/or methods.
Document like you did for Part 1.
For Part 2, submit two files on Blackboard: Date.java and DateDemo.java
Answer:
Explanation:
The following codes are written in Java. Both the class and the classDemo are in the same file but seperated as classes should be for each part of the question. The example outputs are shown in the attached pictures below, and the codes are added as txt files due to technical difficulties.
Frank enters "1" in the field for postal code. What is frank most likely trying to do?
Answer:
Explanation:
Identify the management, organization, and technology factors responsible for slow adoption rates of internal corporate social networks.when a company decides to launch a social networking program the management, all need to be on board with the launch. from the ceo down to the shift or assistant manager everyone needs to know its coming and be excited. the organization of such a launch needs to be mapped out, and training provided for the new systems. within the company, they need to make sure the technology at hand (computers, tablets, and company phones), are all compatible with the system. when a company launches a new system, and the find that the employees are not adopting it, they need to investigate the reasons. is the management at all level's onboard? did we organize the launch properly? do we have the right technology for the system? things can goeither way but if
Jorge necesita saber a cuantos grados Fahrenheit esta la temperatura, pero el servicio meteorológico la indica
en grados centígrados, ayúdale a resolverlo. Formula F=(9/5*C) +32
·HACERLO EN ALGORITMO
Answer:
Eso es fácil hermano de matemáticas. Solo haces 9/5 veces c = 18/25 + 32 = 67
Explanation:
13. By adding built-in writable memory to its cartridge, Nintendo’s _________________ was the first console game that gamers could save.
a) Mario Bros.
b) Donkey Kong
c) The Legend of Zelda
d) Zork
List all the steps used to search for 25 in the sequence given below. Use both (a) linear search and (b) binary search. 2, 7, 13, 18, 21, 24
Answer:
13217182472
Explanation:
liner search and binary search
write a c program to find product of all even numbers between 10 t0 30
Answer:
#include <stdio.h>
int main(void) {
unsigned long n = 1;
for(unsigned long i=10; i<=30; i+=2) {
n *= i;
}
printf("%lu",n);
return 0;
}
Explanation:
The output is: 111588212736000
The answer will take 47 bits, so you have to use 64-bit longs. An int is 32 bit thus will give the wrong answer due to a numeric overflow.
#include <stdio.h>
int main() {
long long int product = 1;
for(int i = 10; i <= 30; i = i + 1) {
if(i%2 == 0) {
product = product * i;
}
}
printf("%lld",product);
return 0;
}
DISPLAY111588212736000
EXPLANATIONDeclare the variable product as a long long integer type to hold 8 bytes.
Use a for loop which initializes at 10 and maximizes at 30, and increases a point each time.
Use an if statement to check for even numbers by checking the remainder.
Display the product.
Write a program in Python that:
- Reads in the data in the file given, Sets up the appropriate classes/attributes/methods, Assigns definitions to each category, Prints out the report for all instances in the input file
Setting up the data:
Month name, Number of days in the month, Market name, Category name, Category definition, Store name, Store type, brand name, sales
The output should have 10 lines or sets of lines. The output will look like this:
For the month of April, Charmin Bath Tissue within Jewel Food stores had sales of $ 68 in the Chicago market for a market share of 52
For the month of April, Charmin Bath Tissue within Jewel Food stores had sales of $ 62 in the Chicago market for a market share of 47
File contents are in .csv file (excel) and were copied and pasted below:
April 30 Chicago Bath Tissue Jewel Food Charmin 68
June 30 Chicago Bath Tissue Jewel Food Charmin 74
April 30 Chicago Bath Tissue CVS Drug Charmin 96
June 30 Chicago Bath Tissue CVS Drug Charmin 33
April 30 Chicago Bath Tissue Jewel Food Scott 62
June 30 Chicago Bath Tissue Jewel Food Scott 87
April 30 Chicago Bath Tissue CVS Drug Scott 98
June 30 Chicago Bath Tissue CVS Drug Scott 39
April 30 Chicago Bath Tissue Marianos Food Charmin 85
June 30 Chicago Bath Tissue Marianos Food Charmin 20
Answer:
Explanation:
The following code is written in Python. It is a function that takes in the location of the csv file. Reads it line by line and ouputs the desired statement as seen in the example output provided in the question. The data does not provide the market share value to add to the statement so it was left blank.
from csv import reader
def printCSV(csv_file):
with open(csv_file, 'r') as read_obj:
csv_reader = reader(read_obj)
for row in csv_reader:
print(
"For the month of " + row[0] + ", " + row[7] + " " + row[3] + " " + row[4] + " within " + row[5] + " " +
row[6] + " stores had sales of $ " + row[8] + " in the " + row[2] + " market for a market share of ")
2. Released in 1992, Street Fighter II, the revolutionary fighting game, was developed by which company?
a) Electronic Arts
b) Atari Interactive Inc.
c) Capcom
d) Nintendo
Answer:
It is D
Explanation:
Street Fighter II: The World Warrior is a competitive fighting game developed by Capcom and originally released for arcade systems in 1991.
Answer:
c
Explanation:
Your program will be used by many departments at the university. Your comments will be important to their IT people. What would be a useful comment?
This was a really hard part to write, but it finally works.
I’m not sure what this does, but I don’t have time to troubleshoot it.
This segment returns a value that is used by the segment marked B.
Answer:
This segment returns a value that is used by the segment marked B.
Explanation:
just took assigment
Answer:
C
Explanation:
How to connect on phpmyadmin?plss
Open your browser and go to localhost/PHPMyAdmin or click “Admin” in XAMPP UI. Now click Edit privileges and go to Change Admin password, type your password there and save it. Remember this password as it will be used to connect to your Database.
hope this helps!
Write a method that converts a time given in seconds to hours, minutes and seconds using the following header:
public static String convertTime(int totalSeconds)
The method returns a string that represents the time as hours:minutes:seconds.
Write a test program that asks the user for the time in seconds and then display the time in the above format.
Answer:
hope this helps.
Explanation:
import java.util.*;
class Timeconvert{ //class nane
public static String convertTime(int totalSeconds) /* fn to convert seconds to hh:mm:ss format */
{
int sec = totalSeconds; // a copy of totalSeconds is stored in sec
int m=sec/60; //to find the total min which obtained by doing sec/60
int psec=sec%60; //psec store remaining seconds
int hrs=m/60; //stores hr value obtained by doing m/60
int min=m%60; //stores min value obtained by m%60
return (hrs + ":" + min+ ":" +psec);// returning that string
}
}
public class Main
{
public static void main(String[] args) {
Timeconvert t = new Timeconvert();
Scanner in = new Scanner(System.in); //Scanner class
System.out.println("Enter the number of seconds:");
int sec = in.nextInt(); //to input number of seconds
System.out.println("hours:minutes:seconds is " + t.convertTime(sec)); //result
}
}
You work in a pawn shop that gets in shipments of jewelry. Each shipment is kept in a file (see below for a sample file) and contains the type of jewelry, the stone in the piece of jewelry and whether it is real or fake. Create a function that prints to screen certain information about the shipment and returns the number of a specific number of items (based on the arguments-see sample runs)
File: jewelry1.txt ring diamond real necklace diamond real ring sapphire fake bracelet ruby fake bracelet diamond fake Sample runs: printf("%d\n",get_available_items("jewelry1.txt","stone")); (base) Computers-MacBook Air! computers .la.out I see that -stone- is important in this shipment. Any specific stone to count? diamond OK. I will keep count of the number of the following that I find: diamond --diamond print out all stones --diamond - - Sapphire --ruby --diamond -ruby returns 3 since there are 4 diamonds printf("%d\n",get_available_items("jewelry1.txt", "type")); (base) Computers-MacBook Air:C computers ./a.out I see that -type- is important in this shipment Any specific type to count? ring Ok. I will keep count of the number of the following that I find: ring ring print out all types --necklace -ring --bracelet --bracelet --ring 3 returns 3 since there are 3 rings printf("%d\n",get_available items("jewelry1.txt", "authentic")); (base) Computers - MacBook Air:C computers .la.out I see that -authentic. is important in this shipment. Any specific authentic to count? fake Ok. I will keep count of the number of the following that I find: fake - real print out all real/fake - real - fake - fake --fake fake returns 4 since there are 4 fakes printf("%d\n",get_available_items("jewelry1.txt","cookie")); (base) Computers-MacBook Air:C computers ./a.out Unknown parameter to check...-1 you have to pass one of the following: type. Stone, authentic
I find: ring ring print out all types --necklace -ring --bracelet --bracelet --ring 3 returns 3 since there are 3 rings printf("%d\n",get_available items("jewelry1.txt", "authentic")); (base) Computers - MacBook Air:C computers .la.out I see that -authentic. is important in this shipment. Any specific authentic to count? fake Ok. I will keep count of the