0
On my PC this code does not work correctly
33 Answers
+ 6
To me, I changed latnum for latnum on line 33, as Asterisk pointed out and tested. Two numbers came out, a big (4 digits) and a small one (1 digit). A question: you never use min and max. Was the idea of the code to produce numbers between 999 and 9999?
+ 6
One important problem: the if statements test if the numbers are greater than the next, but they won't give out a satisfactory result in case any number is equal to another. Last attempt produce 6799 and resulted in 6. Probably because 9 (thirdnum) and 9 (lastnum) are the same. Check with >= instead of >. See what happens.
+ 6
One last suggestion: after thirdnum, you don't do the division of num by 10 and lastnum can thus still be a two digit number. Also, instead of dividing lastnum by 10, try lastnum with modulus %.
+ 4
*Code removed*
+ 3
line 33 last num and not latnum
+ 3
SoloLearn uses an online compiler
+ 1
This is syntaxe problem and you have many errors. Your code is also confusing. Please write your code from the beginning and ident the code.
+ 1
Yeah I meant "num"
0
They gave a traceback for a reason. Your variable number doesn't exist.
0
I didn't understand...
0
He didn't even declare the variable "num"
0
There are no such errors on PC
0
Or he wanted to say "num1", but he says "num"
0
The problem is not your pc dude. It's your code.
0
And you have many errors. I think that the best thing to do is start from the beginning.
0
Well there is a problem with an else if without a expression. In every condition you must have an expression inside.
0
I wrote off code from the PC, may have written with an error
0
You made a lot of mistake, but it's just syntaxe errors. It can easily be fixed
0
Do not look at syntax errors
0
Important. Code does not always output the biggest numeral