Create a program that takes in two numbers and returns the highest of the two

print("Enter two numbers. I will tell the highest of the two.") num1 = input("Number 1: ") num2 = input("Number 2: ") if (num1 == num 2) print ("They are the same".) else if (num1 > num2) print (num1) else print (num2)

DH
Answered by Dom H. Python tutor

1642 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

What's the difference between a local and a global variable?


Write a simple number guessing game, give the user 3 tries to guess a number between 1 and 10


Create a program that generates prime numbers between two integer boundareis


Demonstrate a recursive solution to calculate the factorial of a number


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences