What is wrong with my code listed below? Thanks in advance for your assistance!
Instructions:
You are given three numbers as input. Write a program to perform the following operations:
Divide the first number by the second number and print the quotient.
Find the remainder when the first number is divided by the second number and print the result.
Raise the first number to the power of the third number and print the result.
My Code:
Instructions:
You are given three numbers as input. Write a program to perform the following operations:
Divide the first number by the second number and print the quotient.
Find the remainder when the first number is divided by the second number and print the result.
Raise the first number to the power of the third number and print the result.
My Code:
# Input: Get three numbers from the user number1 = int(input("")) number2 = int(input("")) number3 = int(input("")) # Divide the first number by the second number and print the quotient quotient = number1 / number2 print("Quotient:", quotient) # Find the remainder when the first number is divided by the second number and print the result remainder = number1 % number2 print("Remainder:", remainder) # Raise the first number to the power of the third number and print the result power = number1 ** number3 print("Result:", power)
Larz60+ write Dec-23-2024, 10:43 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Tags added this post.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Tags added this post.