x,y,z = 10,20,x | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 3

x,y,z = 10,20,x

tell the output of this question, how to solve error

15th Jun 2018, 6:40 AM
Atul Kumar Patel
Atul Kumar Patel - avatar
4 ответов
+ 3
Atul Kumar Patel, Alexander Sokolov : x,y=10,20 z=x Because : Python evaluates expressions from left to right. Notice that while evaluating an assignment, the right-hand side is evaluated fully before the left-hand side: So, 10 and 20 are numbers and defined naturally but 'x' character in right hand of assignment not defined to program and so you see an error message. Ok?
15th Jun 2018, 7:06 AM
Root
Root - avatar
+ 2
Please write more correctly about this issue so that other people can understand it and answer it.
15th Jun 2018, 6:59 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 1
Alexander Sokolov ,this code show an error. The assignment of x to z show this error: "x not define "😫 https://code.sololearn.com/cqwvNE0wvQUg/?ref=app
15th Jun 2018, 7:01 AM
Root
Root - avatar
+ 1
then how to define
15th Jun 2018, 7:02 AM
Atul Kumar Patel
Atul Kumar Patel - avatar