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)

Answered by Dom H. Python tutor

1513 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

What can be used to iterate through a list in python?


Implement a rocket launch countdown.


How does a for loop work in Python?


Write a function that takes a string, and outputs that string formatted in camelcase. (alternating upper and lower case for each character, e.g. cAmElCaSe)


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo
Cookie Preferences