Answer:
(1) The program in Python is as follows:
rows, cols = (3, 3)
arr =[[0,0,0],[2,2,2],[-2,-2,-2]]
print(arr)
arr[0][0] = 10
arr[2][2] = -10
print(arr)
for i in range(rows):
for j in range(cols):
arr[i][j]-=2
print(arr)
for i in range(rows):
for j in range(cols):
if arr[i][j]< 0:
print(arr[i][j], end = ", ")
(2) The program in Python is as follows:
import numpy as np
x = [10000, 1000, 100, 10, 1, 0, -10, -100]
p = [0.05, 0.05, 0.20, 0.20, 0.1, 0.1, 0.1, 0.2]
q = np.dot(x,p)
print(q)
Explanation:
(1)
This initializes the rows and columns of the array to 3
rows, cols = (3, 3)
1. This creates and array and also populates it with the given data
arr =[[0,0,0],[2,2,2],[-2,-2,-2]]
Print the array
print(arr)
2. This changes index 0,0 to 10 and index 2,2 to -10
arr[0][0] = 10
arr[2][2] = -10
Print the array
print(arr)
This iterates through the rows and the columns of the array
for i in range(rows):
for j in range(cols):
3. This subtracts 2 from each array element
arr[i][j]-=2
Print the array
print(arr)
This iterates through the rows and the columns of the array
for i in range(rows):
for j in range(cols):
If array element is negative
if arr[i][j]< 0:
4. Print the array element
print(arr[i][j], end = ", ")
(2)
Line 1 and 2 are given as part of the program
x = [10000, 1000, 100, 10, 1, 0, -10, -100]
p = [0.05, 0.05, 0.20, 0.20, 0.1, 0.1, 0.1, 0.2]
This uses np dot to multiply x and p
q = np.dot(x,p)
This prints the result of the product
print(q)
Task Instructions
In cel E10, create a fomula by entering cell references
that adds cells B9 and B10, and then subtracts cell EB.
Answer:
= B9 + B10 - E8
Explanation:
Required
Create a formula in E10 that subtracts E8 from the sum of B9 and B10
The sum of B9 and B10 is represented with B9 + B10
When E8 is subtracted, the formula becomes B9 + B10 - E8
To write a formula in Excel, you start with " = " sign.
So, type the following in cell E10
= B9 + B10 - E8
The cell references in this case are the name of the cells; i.e. B9, B10 and E8
Examine the strength of the passwords that you use. How
vulnerable are your passwords to guessing? To brute-force
hacking?
Well nobody can guess my password, and if they were to brute-force hack me they have a 50% chance of finding my password.
At what point is photo editing too much? What is your opinion? Please answer in 5-7 sentences.
Answer:
Too much photoshop to the point where you start to resemble Kim Kardashian is way too much. Simple men like me enjoy average women. Like makeup, an absurd amount of photoshop will deter most men as they'll find you shallow and fraudulent. More women should start to flaunt their natural beauty. Natural beauty is always a better indicator than excessive photoshop for a good relationship and partner.
Explanation:
The importance of Information systems in hospitality industry?
Answer:
This system helps in managing customer data effectively which organizations in tourism & hospitality industry can use to perform various promotional & direct marketing activities. Information provided by MIS helps an organization in management control, transaction processing, strategic planning and operational control.
##the role of info sys in hospital
it can facilitate the process of treating a patient by making the access to patient health record easier and more efficient. this in turn assure they get the right treatment and medicines. and if they need to be transferred to other hospital thier file can be also transferred in a matter of seconds.
The importance of Information systems in hospitality and tourism industry is that it has aided by:
Lowering costs.Boast operational efficiency.Improve services.The importance of Information systems?The use of Information system is one that helps us to save information in a database more easily.
Conclusively, the use of Information Technology in the hospitality and tourism sector is one that has span over a decade and has helped to lower costs and boast operational efficiency.
Learn more about Information systems from
https://brainly.com/question/14688347
What are examples of the major macro actions? Check all that apply.
A) create new records
B) open and close forms
C) open database objects
D) lock databases from changes
E) prevent users from viewing data
F) navigate through records
G) import and export data
Answer:
A)create new records
B)open and close forms
C)open database forms
F)navigate through records
G)import and export data
Explanation:
Correct on Edge
7.1.5:Doghouse The string is “doghouse”, and you will need to print “h” and “e” using multiple index values. You should use the letters' positions to index. You should print h, e, and e. python
Answer:
strs = "doghouse"
print(strs[4])
print(strs[7])
print(strs[7])
Explanation:
Given
[tex]String = "doghouse"[/tex]
Required
Print h, e and e.
Let the variable name be strs.
So, we have:
[tex]strs = "doghouse"[/tex]
The index of h is 3.
So,
print(strs[4]) will print h
Similarly,
The index of e is 7.
So,
print(strs[7]) will print e
So, the code to print h, e and e is:
strs = "doghouse"
print(strs[4])
print(strs[7])
print(strs[7])
what is the fullform of BIT
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
The full Form of BIT is "Binary digit" which is the basic unit of information in computing . A Binary digit can be 0 or 1 . 0 represents off state & 1 represents on state .
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Sum of 18/7 and 13/7 is *
Answer:
[tex]\frac{31}{7}[/tex]
Explanation:
[tex]\frac{18}{7} + \frac{13}{7}[/tex]
[tex]\frac{18 + 13}{7}[/tex]
[tex]\frac{31}{7}[/tex]
If an image has only 4 colors, how many bits are necessary to represent one pixel’s color? Describe a new custom encoding that uses fewer bits to represent each color in the image. What is your encoding for each color? If you were to re-encode this image using your new encoding, how many bits would you save when compared to the 24 bit RGB encoding?
Answer:
1) 2 bits 2) shown in explanation 3) shown in explanation 4) 22 bits per pixel (2.75 bytes)
Explanation:
As a bit is one of two states, 1 or 0, 2 bits is sufficient to represent 4 colors:
00 = color 1
01 = color 2,
10 = color 3,
11 = color 4
This would be the custom type of encoding for that specific image as it only uses 4 colors.
Now to calculate the amount of memory saved, which is quite simple:
24-2=22
So you Would save 22 bits per pixel or 2.75 bytes per pixel.
RGB is a colour complementary wherein the main light colors of red, green, and blue are coupled in distinct ways of representing a range of colors. It uses to design is named again for preliminary colors red, blue and green of 3 primary additive color schemes.
Following are the solution to the given question:
Calculating the number of total bits which is required:[tex]\bold{= \log_2\ \text{(total number of colors)}}\\\\\bold{= \log_2\ (4)}\\\\\bold{= 2}[/tex]
Because only 4 colors seem to be prevalent, we could have the very next global color encoding:[tex]\to \bold{ Black = 00}\\\\\to \bold{White= 01}\\\\\to \bold{Red= 10}\\\\\to \bold{Blue= 11}\\[/tex]
So, the number of total bits through the image:[tex]\to \bold{= (17 \times 20) \times 24} \ \bold{= 8160}[/tex]
The number of total bits for the picture now is custom encoded
[tex]\to \bold{= (17 \times 20) \times 2} \ \bold{= 680}[/tex]
Calculating the percentage:
[tex]\bold{= \frac{\text{(original bits - new bits)} \times 100}{\text{original bits}}}\\\\\bold{= \frac{(8160 - 680) \times 100}{8160}}\\\\\bold{= \frac{7480 \times 100}{8160}}\\\\\bold{= \frac{748000}{8160}}\\\\\bold{= 91.67\%}[/tex]
So, the final answer is "2,00,01,10,11, and 91.67%"
Note:
Please find the complete question in the attached file.
Learn more:
brainly.com/question/20796198
what is fruit nursery?
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
➨ Fruit NurseryA Place where young plants and trees are grown for sale or for planting elsewhere is known as nursery. From this definition you can generate the definition of fruit nursery as well!
So, fruit nursery is a place where the local wild fruit seed is sown to grow seedlings. Apart from fruit nursery there are various kind of nursery
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Create a CourseException class that extends Exception and whose constructor receives a String that holds a college course’s department (for example, CIS), a course number (for example, 101), and a number of credits (for example, 3). Create a Course class with the same fields and whose constructor requires values for each field. Upon construction, throw a CourseException if the department does not consist of 3 letters, if the course number does not consist of three digits between 100 and 499 inclusive, or if the credits are less than 0.5 or more than 6. The ThrowCourseException application has been provided to test your implementation. The ThrowCourseException application establishes an array of at least six Course objects with valid and invalid values and displays an appropriate message when a Course object is created successfully and when one is not.
Answer:
Explanation:
The following classes were created in Java. I created the constructors as requested so that they throw the CourseException if the variables entered do not have the correct values. The ThrowCourseException application was not provided but can easily call these classes and work as intended when creating a Course object. Due to technical difficulties, I have added the code as a txt file down below.
In this exercise we have to use the knowledge of computational language in JAVA, so we have that code is:
It can be found in the attached image.
So, to make it easier, the code in JAVA can be found below:
class Course {
private final Object CourseException = new Object();
String department;
int courseNumber;
double credits;
final int DEPT_LENGTH = 3;
final int LOW_NUM = 100;
final int HIGH_NUM = 499;
final double LOW_CREDITS = 0.5;
final double HIGH_CREDITS = 6;
public Course() throws Throwable {
throw (Throwable) CourseException;
}
See more about JAVA at brainly.com/question/2266606
a.) Software architecture is the set of principal design decisions about a system. b.) Software architecture dictates the process used by a team to develop use cases for a software system c.) Software architecture serves as the blueprint for construction and evolution of a software system d.) Software architecture is the clear definition of multiple high-level components that, when working together, form your system and solve your problem e.) All of the above statements are true.
Question:
Which of the following statements is not a true statement about software architecture?
Answer:
b.) Software architecture dictates the process used by a team to develop use cases for a software system.
Explanation:
A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are six (6) main stages in the creation of a software and these are;
1. Planning.
2. Analysis.
3. Design.
4. Development (coding).
5. Deployment.
6. Maintenance.
One of the most important steps in the software development life cycle (SDLC) is design. It is the third step of SDLC and comes immediately after the analysis stage.
Basically, method design is the stage where the software developer describes the features, architecture and functions of the proposed solution in accordance with a standard.
Software architecture can be defined as the software blueprint or infrastructure in which the components (elements) of the software providing user functionality and their relationships are defined, deployed and executed. Thus, it is a structured framework used by software developers to model software components (elements), properties and relationships in order to have a good understanding of how the program would behave.
In conclusion, software architecture doesn't dictate the process used by a team to develop use cases for a software system.
What is SDLC? Why a commerce student must learn about SDLC and its phases? How SDLC could help a commerce graduate in career growth and success
Explanation:
A, B & C form the vertices of a triangle.
∠ CAB = 90°, ∠ ABC = 73° and AB = 9.4.
Calculate the length of BC rounded to 3 SF
What are the purposes of a good web page design?
The purpose of a good web page design is to make it
and
Answer:
functional and aesthetically pleasing/look nice
Answer:
Link and lokk nise and spell word correctly
Explanation:
Hope it help if im wrong im sorry
Anika added a picture to a cell in an Excel spreadsheet. She wants to permanently make the picture smaller. What
is the most efficient way to adjust the size of the picture?
compressing the picture in the Picture Tools tab
O changing the size of the cell where the picture was inserted
double-clicking the picture to click and drag a corner to the appropriate size
o editing the size of the photo in a different program and reinserting the picture
Answer:
A. Compressing the picture in the Picture Tools tab
Explanation:
To compress the size of a picture in Excel spreadsheet is by choosing the compress pictures option in the Picture Tools tab.
Once you select the picture(s) you want to reduce the size, a new option of 'Picture Format' will appear on the toolbar. In that option, many options will appear. One of these option is 'compress pictures'. With the help of this option, you can either compress picture or multiple pictures.
Therefore, the correct way to compress pictures in Excel spreadsheet us option A.
What cybersecurity hazards might there be for users in the new wireless environment?
Answer:
Explanation:
spoofing and session hijacking - where the attacker gains access to network data and resources by assuming the identity of a valid user. eavesdropping - where unauthorised third-parties intercept the data being transmitted over the secure network.
A memory hierarchy is composed of an upper level and a lower level. Assume a CPU with 1ns clock cycle time. Data is requested by the processor. 8 out of 10 requests find the data in the upper level and return the data in 0.3ns. The remaining requests require 0.7 ns to return the data. Determine the corresponding values for the upper level memory.
Hit rate =
Miss rate =
Hit time =
Miss penalty =
AMAT =
Answer:
Hit rate = 80%
Miss rate = 20%
Hit time = 0.3 ns
Miss penalty = 0.4 ns
AMAT ≈ 3.875 ns
Explanation:
8 out of 10 = 0.3ns. to return data ( also finds data in the upper level )
2 out of 10 = 0.7 ns to return data
a) Hit rate in upper level memory
= 8/10 * 100 = 80%
b) Miss rate
= 2/ 10 * 100 = 20%
c) Hit time in the upper level memory
Hit time = 0.3 ns
d) Miss penalty
This is the time taken by the missed requests to return their own data
= 0.7 ns - 0.3 ns = 0.4 ns
e) AMAT ( average memory access time )
Hit rate = 80% , Hit time = 0.3ns
miss rate = 20% Miss time = 0.7 ns
hence AMAT = (0.3 / 0.8 ) + (0.7 / 0.2 )
≈ 3.875 ns
plz i need help what is wrong on line 14
Indentation is very important in python. You need to indent code inside while loops, for loops, if statements, etc. You don't seem to be indenting.
In this example:
while (secretNum != userGuess):
userGuess = int(input("Guess a number between 1 and 20: "))
Although, you might need to indent more than only this line. I hope this helps.
2. While Wii was an accessible console that appealed to a broad audience, Zynga made access to video games even easier for everyone by ________ .
a) Shipping a console for free with their game
b) Making their game accessible via the internet, with no need for a console
c) Providing a free downloadable file of the game
d) Shipping their game on every type of cell phone available at that time
Answer:
Making their game accessible via the internet, with no need for a console
Explanation:
They made games like Farmville around this time
Consider a direct-mapped cache with 256 blocks where block size is 16 bytes. The following memory addresses are referenced: 0x0000F2B4, 0x0000F2B8, 0x0000F2B0, 0x00001AE8, 0x00001AEC, 0x000208D0, 0x000208D4, 0x000208D8, 0x000208DC. Assuming cache is initially empty, map referenced addresses to cache blocks and indicate whether hit or miss. Compute the hit rate.
Answer:
Explanation:
.bnjuk
Someone help me out eh?
Line 4
It should be font-size: 15px
Also there should be curly braces in line 5.
Answer:
You are screwed
Explanation:
no one cares about this Question
how computer user interact with an application programs
Answer:
From the help of graphic user interface
Explanation:
A graphical user interface, or GUI, is used in almost all software programmes. This indicates that the software contains graphical functions that the user can manipulate using a any input device like mouse or keyboard. A software configuration program's graphical user interface (GUI) contains a menu bar, toolbar, tabs, controls, as well as other functions.
What are some examples of natural barriers that separate group members?
Answer: "Natural barriers that can separate species group members are volcanos, and mountain ranges. Other examples of natural barriers include rivers, lakes, and other bodies of water; cliffs and other types of terrain that are difficult to traverse; and areas dense with certain types of plant life (e.g., blackberry bushes)."
Hope it helps <3
4. (15 points) Give an algorithm that takes as input a positive integer n and a number x, and computes xn (i.e., x raised to the power n) by performing O(lgn) multiplications. Your algorithm CANNOT use the exponentiation operation, and may use only the basic arithmetic operations (addition, subtraction, multiplication, division, modulo). Moreover, the total number of basic arithmetic operations used should be O(lgn).
Answer:
The algorithm is as follows:
Exponent(x, n):
if(n == 0):
return 1
pr = Exponent(x, int(n / 2))
if (n % 2 == 0):
Return pr* pr
else:
if(n > 0):
Return x * pr* pr
else:
Return (pr* pr) / x
Explanation:
In order to get a O(log n) time complexity, a recursive procedure is implemented by the algorithm
The algorithm begins here
Exponent(x, n):
If n is 0, the procedure returns 1
if(n == 0):
return 1
This recursively calculates the product of x, n/2 times
pr= Exponent(x, int(n / 2))
If n is even, the square of prod (above) is calculated
if (n % 2 == 0):
Return pr* pr
If otherwise (i.e. odd)
else:
If n is above 0, the square of prod multiplied by x is calculated
if(n > 0):
Return x * pr* pr
If otherwise, the square of prod divide by x is calculated
else:
Return ([tex]pr* pr[/tex]) / x
The time complexity is: O(log|n|)
HELP WILL MARK BRAINLEST
Answer:
10 - true
11 - true
12 - analytic
13 - factory robots
Explanation:
:)
which component of cpu controls the overall operation of computer..
Answer:
Control Unit.
Explanation:
The component of CPU that controls the overall operation of computer is control unit.
The control unit, also known as CU, is one of the main component of the Central Processing Unit (CPU). The function of CU is to fetch and instruct computer's logic unit, memory, input and output device. The CU receives information which it turns into signals. Thus controlling the overall operations of computer.
Therefore, control unit is the correct answer.
Consider the following Boolean expressions.
A && B
!A && !B
Which of the following best describes the relationship between values produced by expression I and expression II?
(A) Expression I and expression II evaluate to different values for all values of A and B.
(B) Expression and expression II evaluate to the same value for all values of A and B.
(C) Expression and expression II evaluate to the same value only when A and B are the same.
(D) Expression and expression Il evaluate to the same value only when A and B differ.
(E) Expression I and expression Il evaluate to the same value whenever A is true.
Answer:
(D) Expression I and expression Il evaluate to the same value only when A and B differ.
Explanation:
Given
[tex]A\ \&\&\ B[/tex]
[tex]!A\ \&\&\ !B[/tex]
Required
Select the true statement
To do this, I will create the following case scenarios.
(a): [tex]A = true[/tex] and [tex]B = true[/tex]
[tex]A\ \&\&\ B[/tex]
[tex]true\ \&\&\ true \to true[/tex] i.e. true and true is true
[tex]!A\ \&\&\ !B[/tex]
[tex]!true\ \&\&\ !true[/tex]
------------------------------------------------------
[tex]!true = false[/tex]
------------------------------------------------------
So, we have:
[tex]false\ \&\&\ false \to false[/tex]
So:
[tex]A =true[/tex] and [tex]B = true[/tex]
[tex]A\ \&\&\ B = true[/tex]
[tex]!A\ \&\&\ !B = false[/tex]
Hence, options (B) and (E) are incorrect
(b): [tex]A = true[/tex] and [tex]B = false[/tex]
[tex]A\ \&\&\ B[/tex]
[tex]true\ \&\&\ false \to false[/tex]
[tex]!A\ \&\&\ !B[/tex]
[tex]!true\ \&\&\ !false[/tex]
Solve each negation
[tex]false\ \&\&\ true \to false[/tex]
So:
[tex]A =true[/tex] and [tex]B = false[/tex]
[tex]A\ \&\&\ B = false[/tex]
[tex]!A\ \&\&\ !B = false[/tex]
Hence, option (c) is incorrect
(c): [tex]A = false[/tex] and [tex]B = true[/tex]
[tex]A\ \&\&\ B[/tex]
[tex]false\ \&\&\ true \to false[/tex]
[tex]!A\ \&\&\ !B[/tex]
[tex]!false\ \&\&\ !true[/tex]
[tex]truee\ \&\&\ false \to false[/tex]
So:
[tex]A =false[/tex] and [tex]B = true[/tex]
[tex]A\ \&\&\ B = false[/tex]
[tex]!A\ \&\&\ !B = false[/tex]
Case scenarios b and c implies that option (d) is correct because different values of A and B gives the same value of both expression which is false
This also implies that (a) is incorrect.
The cost of 5/2 kg sugar is Rs. 235/4. What is the cost of 1 kg sugar ? *l
Answer:
23.5
Explanation:
give the full form of GUI
Explanation:
graphical user interface
Answer:-
GUI ➺ Graphical User Interface.
6. This interface uses only commands that you type: