Answer:
def prime_generator(s, e):
for number in range(s, e+1):
if number > 1:
for i in range(2, number):
if (number % i) == 0:
break
else:
print(number)
prime_generator(6,17)
Explanation:
I believe you want to ask the prime numbers between s and e.
- Initialize a for loop that iterates from s to e
- Check if the number is greater than 1. If it is, go inside another for loop that iterates from 2 to that number. If the module of that number to any number in range (from 2 to that number) is equal to 0, this means the number is not a prime number. If the module is not equal to zero, then it is a prime number. Print the number
Answer : A Formula is a method, statement, or procedure for achieving something, especially reconciling different aims or positions. A function is an activity or purpose natural to or intended for a person or thing. The difference between the two is a function is a piece of code that executes a predefined calculation, while a formula is something you create yourself.
Answer:
ik its not an answer but it kinda is.. uh GOOGLE
Explanation:
Program to display greater number:
#include <iostream> <em>// Needed to perform IO operations </em>
#include<conio.h> <em> // header file</em>
using namespace std;
int main() //start of the program
{
int a , b =0; //initialising the two integer variable
cout<< "Enter first number"<<endl;
cin >> a; //user's first number
cout<< "Enter second number"<<endl;
cin >> b; //user's second number
if (a>b) //comparing the two integers input by user
cout<< a << "is greater than" << b; //display the greater number
else
cout<< b << "is greater than" << a;
return 0; // exist
}