Input a number and print its table, using FOR loop. Iterative Statments- Example Input a number and print its table, using FOR loop.
Algorithm Dry Run Program/Code a=int(input(“Enter a number”)) Step 1:- Input first number in variable a 4 for i in range(1,11): Step 2:- Iterate it 10 times with for loop having value of i starting from 1 to 10 1 2 … 10 b=a*i 4*1 4*2 4*.. 4*10 Step 3:- multiply a*i in b print(b) 8 Step 4:- print b 4 … 40 Print goodbye print(“Goodbye”)
TAG Question Number Expectations Grade C example and 13 Grade B example, 13 and15 Grade A example, 13,15 and 17 Grade A* example, 13,15,17 & evaluation
Print 10 iterations of Fibonacci sequence. 0 1 1 2 3 5 8 13 21 34 Problem Print 10 iterations of Fibonacci sequence. 0 1 1 2 3 5 8 13 21 34