Answer:
18
Explanation:
lets go step by step.
the function called tryIt has a value, a variable named "a". this "a" variable will be whatever the user enters when the program says, Enter a number.
ok so if we enter "a" as 2, and b in the function will always be 7, and 2 + 7 equals 9,
and the ans variable (short for answer) will take the result of the function (9) and multiply it by 2,
then the answer is 18
Answer:
def barGraph(w, h, data):
# creating Canvas
paper = Canvas(w, h)
# defining variables
largest = max(data) # largest element in data
length = len(data) # length of data list
barWidth = 0.8 * w / length # length of each bar of the histogram
maxBarHeight = 0.8 * h # maximum height of each bar of the histogram
minBarHeight = maxBarHeight / largest # minimum height of each bar
# Starting points
x = 0.1 * w
y = 0.9 * h
# looping through the list
for i in data:
currBarHeight = minBarHeight * i # current bar height
x1 = x + barWidth
y1 = y - currBarHeight
# creating the rectangle, and adding it to the bar graph
bar = Polygon( Point(x,y), Point(x,y1), Point(x1,y1), Point(x1,y) )
bar.setFillColor('grey')
paper.add(bar)
x = x1
# returning the canvas
return paper
Your answer is B. Hop this helps! -John
The total number of chars in each string is basically the size of each string.
Using JAVA:
String[] arr = {"hello", "my", "name", "is", "Felicia"}; int count = 0; for(int i = 0; i < arr.length; i++) { count = count + arr[i].length(); System.out.println("Characters in " + arr[i] + ": " + count); }
Output:
<span>Characters in hello: 5
Characters in my: 7
Characters in name: 11
Characters in is: 13
Characters in Felicia: 20</span>
Answer:
Try blue, purple, red, then yellow.
Explanation: