I am completely stumped on this homework question and cannot figure out how to make the range count down, and I don't know what 5 characters wide means. or how to get the totals. and how to separate the two different multipls from odd and even.  I am able to make the range go from1-300. this is the homework question I have. program4_1.pyWrite a Python program that uses a for loop with the range function to inspect all integers from 300 down to 1. See page 170-172 to learn about the range function. Code in the loop should find exact multiples of 23 and print them in fields 5 characters wide on one line. The loop should also determine two totals; the total of the even multiples and the total of the odd multiples of 23. When the loop ends, the program should display these two totals.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question
100%

I am completely stumped on this homework question and cannot figure out how to make the range count down, and I don't know what 5 characters wide means. or how to get the totals. and how to separate the two different multipls from odd and even. 

 I am able to make the range go from1-300.

this is the homework question I have.

program4_1.py
Write a Python program that uses a for loop with the range function to inspect all integers from 300 down to 1. See page 170-172 to learn about the range function. Code in the loop should find exact multiples of 23 and print them in fields 5 characters wide on one line. The loop should also determine two totals; the total of the even multiples and the total of the odd multiples of 23. When the loop ends, the program should display these two totals.

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr