Answer:
Following are the code to this question can be described as follows:
c= input('Input triangle_char: ') #defining variable c that input character value
length = int(input('Enter triangle_height: ')) # Enter total height of triangle
for i in range(length): # loop for column values
for j in range(i+1): #loop to print row values
print(c,end=' ') #print value
print()# for new line
Output:
please find the attachment.
Explanation:
In the above python code, two variable "c and length" variables are declared, in variable c is used to input char variable value, in the next line, length variable is defined, that accepts total height from the user.
- In the next line, two for loop is declared, it uses as nested looping, in which the outer loop prints column values and inner the loop is used to prints rows.
- To prints all the value the print method is used, which prints the user input character triangle.
It depends on the printers brand as there are a broad range of wireless printers offering all sorts of connections.
Generally speaking, you would want the printer to connect to the network (LAN) this could be done on the printer. Refer to the printer's manual. I think you can also connect it via the computer. Just find it on the computer on 'find printer' in your computers settings. Specify the printers name in order to this.
what...? how is this a question??
Answer:
C code for half()
#include<stdio.h>
void half(float *pv);
int main()
{
float value=5.0; //value is initialized
printf ("Value before half: %4.1f\n", value); // Prints 5.0
half(&value); // the function call takes the address of the variable.
printf("Value after half: %4.1f\n", value); // Prints 2.5
}
void half(float *pv) //In function definition pointer pv will hold the address of variable passed.
{
*pv=*pv/2; //pointer value is accessed through * operator.
}
- This method is called call-by-reference method.
- Here when we call a function, we pass the address of the variable instead of passing the value of the variable.
- The address of “value” is passed from the “half” function within main(), then in called “half” function we store the address in float pointer ‘pv.’ Now inside the half(), we can manipulate the value pointed by pointer ‘pv’. That will reflect in the main().
- Inside half() we write *pv=*pv/2, which means the value of variable pointed by ‘pv’ will be the half of its value, so after returning from half function value of variable “value” inside main will be 2.5.
Output:
Output is given as image.
Answer:
Option A is the correct choice answer for the above question.
Explanation:
In an MS-Powerpoint document, when a user wants to copy the selected shape and drag that shape for use in slides then he needs to--
- Select the shape
- Press the Ctrl key and
- drag that shape on the slide of the powerpoint.
Then the user gets the shape on the slide for their personal use.
The question scenario also suggests the same which is described above. hence Option A is the correct answer while the other is not because--
- Option B suggests 'ESC' which is used to escape any running program.
- Option C suggests about ALT key which is of no use for the MS-Powerpoint document.
- Option D suggests about TAB key which is used to make the space between two texts or diagram.