Answer:
- def getCharacterForward(char, key):
- charList = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-
- if(len(char) > 1):
- return None
- elif(not isinstance(key, int)):
- return -1
- else:
- index = charList.find(char)
- if(index + key <= 25):
- return charList[index + key]
- else:
- return charList[(index + key)% 26]
-
- print(getCharacterForward("C", 4))
- print(getCharacterForward("X", 4))
Explanation:
Firstly, define a charList that includes all uppercase alphabets (Line 2). We presume this program will only handle uppercase characters.
Follow the question requirement and define necessary input validation such as checking if the char is a single character (Line 4). We can do the validation by checking if the length of the char is more than 1, if so, this is not a single character and should return None (Line 5). Next, validate the key by using isinstance function to see if this is an integer. If this is not an integer return -1 (Line 6 - 7).
Otherwise, the program will proceed to find the index of char in the charList using find method (Line 9). Next, we can add the key to index and use the result value to get forwarded character from the charList and return it as output (Line 11).
However, we need to deal a situation that the char is found at close end of the charList and the forward key steps will be out of range of alphabet list. For example the char is X and the key is 4, the four steps forward will result in out of range error. To handle this situation, we can move the last two forward steps from the starting point of the charList. So X move forward 4 will become B. We can implement this logic by having index + key modulus by 26 (Line 13).
We can test the function will passing two sample set of arguments (Line 15 - 16) and we shall get the output as follows:
G
B
Answer:
A problem is a challenging task or process that needs resources not available to the individual or group responsible for the task.
An example of a business problem is data analysis.
Explanation:
A business enterprise is driven by profit making. Investing in a business opportunity requires or demands for feasibility study. Without the right computer skills, a company dives into various physical forms of survey like giving questionnaires to potential clients.
This form of survey requires a lot of time and money that should be invested in other assets in the company and the data acquired, sometimes is not enough to make long term business decisions.
On the other hand, when a spreed sheet application is used (like microsoft excel) by a business data analyst with big data and data visualization skills, large data could be accessed online and analysed of a fast and efficient descriptive and predictive analysis for long term business decisions.
Answer:
c)1e6f28
Explanation:
The integer pointer intpoint2 points to the address 1e6f24.On increasing the inpoint.The intpoint will point to next location and since we know that the memory taken by integers is 4bytes.So the pointer will move to the next location 4 bytes ahead.
1e6f24+4=1e6f28.
Hence the answer is option c.
The decade in which the personal computers became commonplace in offices, schools, and some homes were the 1980s.
Answer:
Apex legends, Snap chat, face book, twitter, you tube
Explanation:
They are all connected to the internet they are all provided via internet