top of page

Python Coding Help

Public·1 member

Write a program to calculate and print the amount of change to be returned to the customer

Create a program that calculates and prints the amount of change to be returned to the customer after paying the bill, based on the manager's input in the system.


Sample Input:

Total Invoice amount(In Dollars): 200

Amount of Tip (In cents): 10

Total Payment received by card: 160

Service Charged on payment made by card: 4%


80 Views

Python program to add two numbers

Write a Python program to find the addition of given two numbers num1 and num2 by user input.


Example :


Input:
Enter the first number: 20
Enter the second number: 30

Output: 50

In python input() method is used to take input from user or you can say take input from user prompt. and best thing about this input() method is that you don't have to write input message to other print function before like we do in other programming languages.


print("Enter the first number:")
num1 = input()

in short, you can write in one line


104 Views
    bottom of page