🐍 Python Pa help po sa code ko

Status
Not open for further replies.

Chunchunmaru

Eternal Poster
Bago lang po kase ako sa Phyton, saan kaya ang error nito? Bat ayaw mag execute nung next line?
Screenshot_20210930_205108.webp
 
# Sana makatulong
num1 = int(input("Enter First number: "))
num2 = int(input("Enter Second number: "))

if num1 > num2:
print(f"{num1} is greater than {num2}")
elif num1 < num2:
print(f"{num1} is less than {num2}")
else:
print(f"{num1} is equal to {num2}")
 
# Sana makatulong
num1 = int(input("Enter First number: "))
num2 = int(input("Enter Second number: "))

if num1 > num2:
print(f"{num1} is greater than {num2}")
elif num1 < num2:
print(f"{num1} is less than {num2}")
else:
print(f"{num1} is equal to {num2}")
Lods alam mo ba kung pano to ayusin
Screenshot_20210930_213944.webp

Sa else lang na condition yung na re read nya, saan kaya ang problema?
 
num1 = input("First number: ") num2 = input("Second number: ") if num1 < num2: print("Num 1 is greater than Num 2") elif num1 > num2: print("Num 1 is less than Num 2") else: print("Both numbers are equal")

Try mo to lods.
 
num1 = input("First number: ") num2 = input("Second number: ") if num1 < num2: print("Num 1 is greater than Num 2") elif num1 > num2: print("Num 1 is less than Num 2") else: print("Both numbers are equal")

Try mo to lods.
pahelp namabc mga lods may codes kasi ko kaso dapst pseudocode sana matulongan niyo
 
# Sana makatulong
num1 = int(input("Enter First number: "))
num2 = int(input("Enter Second number: "))

if num1 > num2:
print(f"{num1} is greater than {num2}")
elif num1 < num2:
print(f"{num1} is less than {num2}")
else:
print(f"{num1} is equal to {num2}")
Gumagana tong suggest ni paps.
 
# Sana makatulong
num1 = int(input("Enter First number: "))
num2 = int(input("Enter Second number: "))

if num1 > num2:
print(f"{num1} is greater than {num2}")
elif num1 < num2:
print(f"{num1} is less than {num2}")
else:
print(f"{num1} is equal to {num2}")
Lods, pano i fix, ValueError
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 22
    Replies
  • 803
    Views
  • 6
    Participants
Last reply from:
0R1-qt

Online now

Members online
1,088
Guests online
2,350
Total visitors
3,438

Forum statistics

Threads
2,277,086
Posts
28,974,249
Members
1,229,725
Latest member
serrano32100
Back
Top