Answer:
A set of instructions, written by a programmer, that is used by computers to perform tasks
A programming and software development professional would most likely help with
Testing a software program.
To work with data frames in python, the pandas library ls very efficient. Therefore, the following lines of code will <em>load, subset and display the maximum value</em> of each column in the subset :
import pandas as pd
<em>#This</em><em> </em><em>imports</em><em> </em><em>the</em><em> </em><em>pandas</em><em> </em><em>dataframe</em><em> </em><em>and</em><em> </em><em>alias</em><em> </em><em>it</em><em> </em><em>as</em><em> </em><em>pd</em><em> </em>
df_cars = pd.DataFrame('Cars.csv')
<u>Subsetting the firsts UserNum row</u> :
Using the index location method, the first userNum row has a row index of 0.
df_subset = df.iloc[:0, :]
<em>#this</em><em> </em><em>selects</em><em> </em><em>only</em><em> </em><em>the</em><em> </em><em>first</em><em> </em><em>row</em><em> </em><em>and</em><em> </em><em>all</em><em> </em><em>the</em><em> </em><em>columns</em><em> </em>
<em>#first</em><em> </em><em>row</em><em> </em><em>of</em><em> </em><em> </em><em>df_cars</em><em> </em><em>dataframe</em><em> </em><em>has</em><em> </em><em>been</em><em> </em><em>assigned</em><em> </em><em>to</em><em> </em><em>another</em><em> </em><em>dataframe</em><em> </em><em>called</em><em> </em><em>the</em><em> </em><em>df_subset</em>
df_subset.max()
<em>#the</em><em> </em><em>max</em><em> </em><em>function</em><em> </em><em>returns</em><em> </em><em>the</em><em> </em><em>maximum</em><em> </em><em>value</em><em> </em><em>for</em><em> </em><em>each</em><em> </em><em>column</em><em> </em>
<em>Note</em><em> </em><em>:</em><em> </em><em>the</em><em> </em><em>cars.csv</em><em> </em><em>data</em><em> </em><em>wasn't</em><em> </em><em>provided</em><em>,</em><em> </em><em>However</em><em>,</em><em> </em><em>this</em><em> </em><em>is a</em><em> </em><em>run-through</em><em> </em><em>of</em><em> </em><em>how</em><em> </em><em>to</em><em> </em><em>get</em><em> </em><em>the</em><em> </em><em>required</em><em> </em><em>output</em><em>.</em><em> </em>
Learn more :brainly.com/question/16183131?referrer=searchResults
Answer:
Exceptions are raised using throw statement in c++.
Explanation:
Try block is used to keep the statements which we felt that they will raise an exception. Catch block is used to catch the exception which is thrown by the try block.
#include<iostream.h>
void main(){
int x,y,z;
try{
cout<"enter 2 numbers";
cin>>x>>y;
if(y==0)
throw y;
z=x/y;
}
catch(int x){
cout<<"exception caught";
}
}
Answer:
Hopes this helps if not comment and I'll change it
Explanation:
import simplegui
import random
def draw_handler(canvas):
for i in range (0, 1000):
x = random.randint(1, 600)
y = random.randint(1, 600)
r = random.randint(0, 255)
g = random.randint(0, 255)
b = random.randint(0, 255)
color = "RGB( " + str(r) + "," + str(g) + "," + str(b) + ")"
canvas.draw_point((x, y), color)
frame = simplegui.create_frame('Points', 600, 600)
frame.set_canvas_background("Black")
frame.set_draw_handler(draw_handler)
frame.start()