Question

- Write a python program which prints all the numbers between 1 and 100 that are divisible by 3.

Answer #1

Write a program with while loop that prints all numbers
between 5 and 100 (inclusive) that are divisible by 5.

PYTHON 3
Write a program that prints the count of all prime numbers
between A and B (inclusive), where A and B are defined as
follows:
A = 21212
B = A + 5000
Just a recap on prime numbers: A prime number is any number,
greater or equal to 2, that is divisible ONLY by 1 and itself. Here
are the first 10 prime numbers: 2, 5, 7, 11, 13, 17, 19, 23, and
29.
Rules:
You should first...

Using for loops:
- write a Java program that adds numbers between 1 to 100 and
prints the result.
- write a Java program that adds odd numbers between 1 to 100
and prints the result
- write a Java program that averages even numbers between 5 to
30 and prints the result

How do you write a python function that prints numbers contained
within a range of numbers ( for example 300 to 400) and the numbers
printed by the function are self-divisible by all digits in the
number. Could you assist?

- Write a Python program which asks the user to enter a number,
if the number is divisible by 6 or 7, the program prints “The
number X is divisible by 6 or 7” and if the number is neither
divisible by 6 nor by 7, then it prints “The number X is not
divisible by 6 and 7”.

Python code
Write a complete program with for loop which calculates the sum
of the numbers from 1 to 100

Question1: Write a Python Program that asks for the grades of
5 quizzes and then prints the highest grade. [6 Marks]
Question2: Write a Python Program that does the following
tasks. [8 Marks]
Create an
empty list
Ask the user
for 5 positive numbers and append them to the list
Find and
print the sum of all the numbers in the list
Delete the
last element from the list and then print the list
Question3:
Consider you have the following...

Write a program to find all the numbers divisible by 7 between a
given range of numbers [n1, n2] entered by the user using a FOR
loop only.
write C program. help

How to code this in python
Write a program that computes and prints the first 1000 prime
numbers - simply write out each prime number on a new line. In
implementing this solution I want you to define 2 functions:
is_prime which can be used to test whether a number is a prime
(e.g. is_prime(17) returns True but is_prime(9) returns False) and
compute_primes which will return an array (or Python list) of the
first n primes where n is passed...

Write a Python program using while loop that finds and prints
the sum of this geometric series.
1 + 2 +4 +8 + … + 1024

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 14 minutes ago

asked 14 minutes ago

asked 49 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 2 hours ago

asked 2 hours ago

asked 2 hours ago

asked 2 hours ago