What's new

Python Pa help po sa code ko

Status
Not open for further replies.

Chunchunmaru

Eternal Poster
Joined
Aug 31, 2021
Posts
766
Reaction
288
Points
393
Bago lang po kase ako sa Phyton, saan kaya ang error nito? Bat ayaw mag execute nung next line?
Screenshot_20210930_205108.jpg
 

Attachments

use this code:
num1 = input("First number")
same with num 2 gayahin mo lang yan.

Meron reading tutorials sa You do not have permission to view the full content of this post. Log in or register now.
Check mo para aware ka sa ginagawa mo.
 
Last edited:
# 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.jpg

Sa else lang na condition yung na re read nya, saan kaya ang problema?
 

Attachments

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.
 
Last edited:
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

Back
Top