Question: Q 1 ) using for loop and range function, write a program that calculate the sum of all odd digits from 1 to the input

Q1) using for loop and range function, write a program that calculate the sum of all odd digits from 1 to the input given by the user. For example, if the input is 7, the output would be 1+3+5+7=16. As bellow:
Q2) There are 9,870 people in a town whose population increases by 10% each year. Write a while loop that displays the annual population and determines how many years it will take for the population to surpass a population projected given by the user as input. (hint population=population+population*0.1)
The output should be as below:
 Q1) using for loop and range function, write a program that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!