Answer:
Following are the code to the given question:
#include <iostream>//header file
using namespace std;
int main()//main method
{
int r=26,x,y;//defining integer variable
char c;//defining a character variable
for(x= 1; y<= r; x++)//using for loop for count value
{
for(y= 1; y<= x; y++)//using for loop to convert value in triangle
{
c=(char)(y+64);//convert value into character
cout << c;//print character value
}
cout << "\n";//use print method for line break
}
return 0;
}
Output:
Please find the attachment file.
Explanation:
In this code, three integer variable "x,y, and r", and one character variable "c" is declared, that is used in the nested for loop, in the first for loop it counts the character value and in the next for loop, it converts the value into a triangle and uses the char variable to print its character value.
Answer:
See attached file for complete detailed code.
Explanation:
See attached file.
Answer:
new_segment = [ ]
for segment in segments:
new_segment.append({'name': segment, 'average_spend': money})
print( new_segment)
Using list comprehension:
new_segment =[{'name': segment, 'average_spend': money} for segment in segments]
Using map():
def listing(a):
contain = {'name': segment, 'average_spend': money}
return contain
new_segment = [ ]
new_segment.append(map( listing, segment))
print(list(new_segment)
Explanation:
The python codes above create a list of dictionaries in all instances using for loop, for loop in list comprehension and the map function which collect two arguments .
<span>By far, the largest social network for gaming is Facebook. The correct option among all the options that are given in the question is the fourth option or the penultimate option. Facebook is also the most popular social networking website around the world. I hope that this is the answer that has come to your help.</span>