The line of code required to assign a value of 50.00 to a variable of double data type in C++ can be written thus :
- double average_student_grade = 50.00;
The declaration follows the format :
- Data type
- Variable name
- Value
The data type which is first stated, the double data type are floating point (have decimals) numbers which have 64 bit precison(a precison of 15 decimal digits) as opposed to floats which have 32 bit precison (a precison of 7 decimal digits).
The variable name is the name to hold the value of average grade. This name depends on the preference of the programmer. However. It is advisable that variable names are relatable.
Therefore, variable declaration in C++ may follow the format data type then variable name then value.
Learn more :brainly.com/question/12908743
Answer:
def corresponding_of_lists(lst1, lst2):
c = ""
corresponding_list = []
if (lst1 is None) or (lst2 is None):
return None
else:
for i in lst1:
for j in lst2:
c = "(" + str(i) + "," + str(j) + ")"
corresponding_list.append(c)
return corresponding_list
Explanation:
- Create a function called corresponding_of_lists that takes two lists as parameter
- Initialize an empty list to hold the corresponding values
- Check if any of the lists are null, if they are return None
- Otherwise, get the corresponding elements and put them into the corresponding_list
Return the corresponding_list
Answer:
import sys
import turtle
import random
def n_pointed_star(total_points):
if total_points <= 4:
raise ValueError('Not enough total_points')
area = 150
for coprime in range(total_points//2, 1, -1):
if greatest_common_divisor(total_points, coprime) == 1:
start = turtle.position()
for _ in range(total_points):
turtle.forward(area)
turtle.left(360.0 / total_points * coprime)
turtle.setposition(start)
return
def greatest_common_divisor(a, b):
while b != 0:
a, b = b, a % b
return a
turtle.reset()
n_pointed_star(5)
Explanation:
- Inside the n_pointed_star function, check whether the total no. of points are less than or equal to 4 and then throw an exception.
- Loop through the total_points variable and check whether the result from greatest_common_divisor is equal to 1 or not and then set the starting position of turtle and move it.
- Create the greatest_common_divisor which takes two parameters a and b to find the GCD.
- Finally reset the turtle and call the n_pointed_star function.
Answer:
The X and Y coordinates of the object's hotspot
Explanation:
MMF2 is simply known in full as Multimedia Fusion 2, and it is a visual programming tool that was developed by the ward winning software development group known as Clickteam. The programing tool which was made after Multimedia Fusion 1.5 allows for the creation of applications and games.
The tool is built in such a way that the X and Y coordinates of the object's hotspot are rightly used to measure the position of an object in the play area.