00:01
Hello students, here is the python program to calculate the square, cube and fourth power of number from 1 to 10 using with a loop.
00:11
So first of all here we will be printing as it prints the table header with the column name as the number square, cube and the power of 4.
00:22
So this will be the header of the title for the column.
00:26
Then moving to it uses a for loop to iterate through the numbers from 1 to 10.
00:35
So for each number in the range, so it calculates square, cube and the fourth power using an operator as an asterisk.
00:46
Then it uses the formatted string that is the f string to print each row, the table aligning the values in the columns using an abraces, the placeholder and specifying the width and the formatting for each value.
01:06
So the output for the generated code, it will be as the in the form of numbers, number and the square, square of the number, cube of the number and the power of 4 of the number...