Question
13. Write nested for loops. In the outer loop, go through each odd number 1,3,5 and 7. In the inner loop, go through the even
13. Write nested for loops. In the outer loop, go through each odd number 1,3,5 and 7. In the inner loop, go through the even numbers 2,4,6,8. Inside the inner loop, print the sum of the current odd and even numbers. Hint: your first sum should be 1+2 = 3, and your second sum should be 1+4 = 5.
14. Write nested for loops. The outer loop should use the range function and a variable i to go through the numbers from 1 to 10. The inner loop should also use the range function with a variable j to go from 1 to 10. Inside the inner loop, print the values of i and j
15. Repeat exercise 14, but only use odd numbers for both i and j. In [ ]:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started