I don't know if this is going to help you or not because I'm only 13 but let me know if it helps people can now talk to one another more effectively because of things like zoom and it's become more efficient to work at home because we can have online meetings
Answer:
No exception will occur
Explanation:
Given
Unsigned Char
Value = 255
Operation = Decrement
Required
What type of exception occurs?
Let's assume the variable is a.
So, we have that
a = 255
The range of values of an unsigned char a is 0 to 255
So, when a is decremented by 1, the new value of a becomes 254
254 is still within the range of 0 to 255.
Hence, no exception will (or is excepted to) occur
Answer:
males_num=int(input("Enter the number of males\n"))#taking input of the males_num
female_num=int(input("Enter the number of females\n"))#taking input of the female_num
percentage_male=(males_num/(males_num+female_num))*100#calculating the percentage.
print("Percent males: "+str(percentage_male)+"%")#printing the male percentage.
print("Percent females: "+str(100-percentage_male)+"%")#printing the female percentage.
Enter the number of males
21
Enter the number of females
45
Percent males: 31.818181818181817%
Percent females: 68.18181818181819%
Explanation:
The above written code is in python.I have first taken input of the number of males then input of the number of males after that calculating the male percentage in the class.Then calculating the percentage of female students by subtracting the male percentage form 100 that's how we will get the respective percentages then printing the percentages.
Answer:
import pandas as pd
filename = input("Enter file name with the extension included: ")
data = {}
with open("filename", "r") as file:
content = file.readlines()
for line in content:
line_list = line.strip().split(" ")
data[line_list[0]] = line_list[1] * line_list[2]
del line_list
report = pd.DataFrame(list(data.items()), columns = ["lastname", "wages paid"])
print(report)
Explanation:
The python module prompts the user for the file name and opens the text file to extract the employee data with the python open function. It iterates over the file content and saves the last name and the wages paid to the employees ( the hours worked multiplied by the hourly rate) in the dictionary "data".
The dictionary is converted to a dataframe with the Pandas python package and displays the data in tabular format on the screen.
Answer:
lol don't ask people to write code for you
assuming its an array, n is size.
normally:
for(int ele: courseGrades){
cout << ele <<" ";
}
cout << endl;
reverse:
reverse(courseGrades, courseGrades + n);
for(int ele: courseGrades){
cout << ele <<" ";
}
cout << endl;