Answer:
People in households buy goods and services from businesses in an attempt to satisfy their unlimited needs and wants.
Explanation:
Households also sell their labor, land, and capital in exchange for income that they use to buy goods and services that firms produce.
Hello, you haven't provided the programing language in which you need the code, I'll explain how to do it using Python, and you can follow the same logic to make a program in the programing language that you need.
Answer:
1. # -*- coding: utf-8 -*-
2. #Python
3. class Calculator:
4. def add(self):
5. print(a + b)
6. def sub(self):
7. print(a - b)
8. def mul(self):
9. print(a * b)
10. def div(self):
11. print(a / b)
12.
13. obj = Calculator()
14. choice = 1
15. while choice != 0:
16. a = int(input("\nEnter first number: "))
17. b = int(input("Enter first number: "))
18.
19. print("\n0. EXIT")
20. print("1. DIVISION")
21. print("2. ADDITION")
22. print("3. SUBTRACTION")
23. print("4. MULTIPLICATION")
24.
25. choice = int(input("\nEnter your choice: "))
26. if choice == 1:
27. obj.div()
28. elif choice == 2:
29. obj.add()
30. elif choice == 3:
31. obj.sub()
32. elif choice == 4:
33. obj.mul()
34. else:
35. break
Explanation:
- From lines 1 to 12 we define the object with four methods, addition, subtraction, multiplication, and division. Each method contains the operation between two variables inside a print function
- On line 13 we instantiate our class
- On line 14 we declare the variable choice that is going to store the operation that the user wants to perform
- On line 15 we declare a while loop, this is going to keep running the program until the user wants to exit
- From line 16 to 18 we ask the user to enter two numbers
- From line 19 to 24 we print the possible operation, assigning a number for each operation, this indicates to the user what number to press for what operation
- On line 25 we ask the user for the operation
- From lines 26 to 35 we check the user input an accordingly we call the corresponding method to performs the operation
Answer:
A is the input array
B = []
; %B is initially an empty array
for i = 1:length(A)/2 %iterates over A until the midpoint of A
B(i) = A(i) + A(end + 1 - i); %This adds the numbers from the first half and %second half of A, and stores in B
end
disp(B)
Answer:
40.7 million iphones
Explanation:
Gupta. Apple's iPhone sales continued to decline in the third quarter of 2019. Apple sold 40.8 million iPhones, a year-over-year decline of 10.7%.
Answer
First part:
The transmitted 8-bit sequence for ASCII character '&' with odd parity will be 00100110. Here leftmost bit is odd parity bit.
Second part:
The invalid bit sequence are option a. 01001000 and d. 11100111
Explanation:
Explanation for first part:
In odd parity, check bit of either 0 or 1 is added to the binary number as leftmost bit for making the number of 1s in binary number odd.
If there are even number of 1s present in the original number then 1 is added as leftmost bit to make total number of 1s odd.
If there are odd number of 1s present in the original number then 0 is added as leftmost bit to keep the total number of 1s odd.
Explanation for second part:
A valid odd parity bit sequence will always have odd number of 1s.
Since in option a and d, total number of 1s are 2 and 6 i.e. even number. Therefore they are invalid odd parity check bit sequences.
And since in option b and c, total number of 1s are 5 and 7 i.e. odd numbers respectively. Therefore they are valid odd parity check bit sequences.