Question: Python 1. Write a program that prints all prime numbers up to 100. A prime number is a number which is not divisible by any
Python
1. Write a program that prints all prime numbers up to 100. A prime number is a number which is not divisible by any number prior to it. Example of prime numbers: 1, 3, 5, 7, 13, 17
Hint: divide the number by all numbers prior to it and see if the remainder is 0 for any one the divisions. If it is not, then this number is a prime number.
2. Write a program to find the sum of digits in given number.
Example: given number = 238176534, sum of digits = 39
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
