Help

help

Attached: Challenge.png (878x397, 38.85K)

make a dictionary with 0-9
then write an if statement that checks if the numbers are in the dictionary

wouldnt that not cover integersless than 0 and more than 9?

It always returns false??

Attached: Error.png (1615x962, 167.76K)

first check if its a number then check if its an int
simple

bool
only_ints(int a, int b)
{
return true;
}

nigger
a and b is never an int

...

got it

Attached: Done.png (1037x787, 64.25K)

assert(only_ints(6.9, 4.20) == false);


test failed, would not hire you

def only_ints(a, b):
return int(a, default=None) && int(b, default=None)

Dynamic typing was a mistake.

Nigga what language is that?

Vonn neuman paradigm was a mistake

Safe space python

Python

>&&

Oh yeah my bad, meant 'and'

It wouldn't even compile you jsbaby

The fuck are you talking about yes it would

> if true: return true
def only_ints(a,b):
return type(a) is int and type(b) is int