Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num1 = input("Enter a number: ");
- num2 = input("Enter another number: ");
- result = num1 + num2;
- print("By default " + str(num1) + " + " + str(num2) + " = " + str(result)); # Γιατί η Python by default παίρνει τα inputs σαν strings και μετά προσθέτει τα strings και όχι τα νούμερα ως integers
- result2 = float(num1) + float(num2);
- print("The right result is: " + str(num1) + " + " + str(num2) + " = " + str(result2));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement