NEWTON
Asked
6 months ago
14
views
0
How would I write if x is not less that y using
from starkware.cairo.common.math_cmp import is_le
ㅤ This question was originally posted on Triality
0
For the is_le example you would just do the following:
let (is_sorted) = is_le(curr_value, next_value) #get whether the curr_val is less than or equal to the next_val
if is_sorted == 1: # if is_sorted is 0, then curr_val is not less than or equal to next_val
#do some logic
end
The general question of how to do a not operation in a conditional, I am not sure
ㅤ This answer was originally posted on Triality
answered
6 months ago
How do you check if a number is even in Cairo?
Cairo: Using less than or greater than in conditional
How to write "and" conditional logic in Cairo?
Cairo 0.10.0 Error: Cannot unpack return value error
Cairo: Else if statement
How can i learn Cairo with Python base?
Cairo: How do write a log function in Cairo
Cairo: How do write a log function in Cairo
Does writing it to zero actually do something?
Any idea what this could be caused by?
Status “received” while deploying starknet transaction. Is it ok?
Cairo error "Expected expression of type 'starkware.cairo.common.uint256.Uint256' to have an address."
Is there a way to find events in a block without getting receipt for all transactions on Starknet?
Any idea why this code doesn’t connect to argentX in brave?