3. Sum Cubes
by CodeChum Admin
The square of an integer refers to the result of multiplying the integer with itself once. While the cube of an integer refers to the result of multiplying the integer with itself twice. As long as you know that, you could easily solve this!
Instructions:
Input three integers and compute the cubes of each of them.
Check if the sum of the cubes are positive. If it is, print out "Positive", and if not, print out "Negative".
Instructions
Input three integers (negative, positive, or zero) and compute the cubes of each of them.
Check if the sum of the cubes are positive. If so, print out "Positive", and if not, print out "Negative".
Input
A line containing three integers separated by a space.
1 2 3
Output
A line containing a string.
Positive
Write a Python function, named “find_fibonacci”, which accepts a list as input. The function will find and return the elements that satisfy the Fibonacci property:
Example : Input list : [2, 8, 4, 6, 1, 7, 8, 4, 7, 9, 4, 13]
Returned list : [[6,1,7], [1,7,8], [9,4,13]]
Write Python code that uses nested loops to display the following pattern:
1
1 2 1
1 2 4 2 1
1 2 4 8 4 2 1
1 2 4 8 16 8 4 2 1
.
.
.
1 2 4 8 16 32 64 128 64 32 16 8 4 2 1
Write a Python function that finds and prints all the prime numbers, pn, that satisfy the following equation: pn=2k+3L
for some non-negative integers k,L, such that k≤16, L≤16.