Computer Science
Write a program to obtain x, y, z from user and calculate expression : 4x4 + 3y3 + 9z + 6π
Python
Python Data Handling
80 Likes
Answer
import math
x = int(input("Enter x: "))
y = int(input("Enter y: "))
z = int(input("Enter z: "))
res = 4 * x ** 4 + 3 * y ** 3 + 9 * z + 6 * math.pi
print("Result =", res)
Output
Enter x: 2
Enter y: 3
Enter z: 5
Result = 208.84955592153875
Answered By
37 Likes
Related Questions
Write a program to obtain principal amount, rate of interest and time from user and compute simple interest.
Write a program that reads a number of seconds and prints it in form : mins and seconds, e.g., 200 seconds are printed as 3 mins and 20 seconds.
[Hint. use // and % to get minutes and seconds]Write a program to take year as input and check if it is a leap year or not.
Write a program to obtain temperatures of 7 days (Monday, Tuesday … Sunday) and then display average temperature of the week.