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

1836 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

What is the difference between a list and an array?


Whats the output of "for i in "hello world": print(i)" and why/how is this achieved


Write a program that takes a value x and then outputs x Fibonnaci numbers. E.g. if x=6 output would be 1 1 2 3 5 8


[Exam style] Python is an interpreted language. Explain what this means and how interpreted languages differ from compiled languages.


We're here to help

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

MyTutor is part of the IXL family of brands:

© 2026 by IXL Learning