Create a Python script which will accept two positive integers where the first number would be the start of a range and the second number would be the end of a range. Then the application will determine the sum of all EVEN numbers and sum of all ODD numbers from the given range.
Sample Output:
Start of a Range: 5
End of a Range: 10
Sum of Even nos. is 24
Sum of Odd nos. is 21
Create a Python script which will accept a positive integer and will
determine the input number if PERFECT, ABUNDANT, DEFICIENT.
PERFECT – if the sum of the divisors of the number except the number itself is
equal to the number.
E.g. 6 = 1, 2, 3, 6 1 + 2+ 3 = 6
ABUNDANT – if the sum of the divisors of the number except the number itself
is greater than the number.
E.g. 12 = 1, 2, 3, 4, 6, 12 1 + 2 + 3 + 4 + 6 = 16
DEFICIENT – if the sum of the divisors of the number except the number itself is
less than the number.
E.g. 10 = 1, 2, 5, 10 1 + 2 + 5 = 8
Sample Output:
Input a Positive Integer : 20
20 is ABUNDANT!
need the input code
Create a Python script which will accept two positive integers and will
display the COMMON DIVISORS.
Sample Output:
Positive Integer 1 : 20
Positive Integer 2: 12
COMMON DIVISORS of 20 and 12 are…
1 2 4
Create a Python script which will accept a positive integer and will display
the DIVISORS of the input number.
Sample Output:
Input a Positive Integer : 20
The DIVISORS of 20 are…
1 2 4 5 10 20
Create a Python script which will accept a positive integer (n) and any
character then it will display the input character n times.
Sample Output:
Positive Integer (n) : 7
Input any Character : A
A A A A A A A
Create a Python script which will accept two positive integers where the first
number would be the start of a range and the second number would be the end of a
range. Then the application will determine the sum of all EVEN numbers and sum of all
ODD numbers from the given range.
Sample Output:
Start of a Range: 5
End of a Range: 10
Sum of Even nos. is 24
Sum of Odd nos. is 21
What is h(41)-h(40), given the definition of h below?
def h(n):
s = 0
for i in range(1,n+1):
if n%i > 0:
s = s+1
return(s)
Create a Python script which will accept a positive integer and will display the DIVISORS of the input number.
Sample Output:
Input a Positive Integer : 20
The DIVISORS of 20 are...
1 2 4 5 10 20
I need the code to have an output stated above.
Create a Python script which will accept a positive integer (n) and any character then it will display the input character n times.
Sample Output:
Positive Integer (n) : 7 Input any Character : A AAAAAAA
I need the code to have an output stated above.
print multiples of 3 in given N numbers