[英]Truly a beginner, assigning the multiple values to one variable in Python
I want to make an image for any user, that's not specific to one size, I came up with this. 我想为任何用户制作图像,而这并非特定于一种尺寸,我想到了这一点。 I'm new at this, can anyone let me know why this does not work? 我是新手,有人可以让我知道为什么这行不通吗?
blk = makeEmptyPicture(getWidth(pic)+30), getHeight(pic)+30), black)
blk = makeEmptyPicture (
getWidth (
pic )
+30 )
, getHeight (
pic )
+30 )
, black )
BLK = makeEmptyPicture (
的getWidth (
PIC )
30 )
,的getHeight (
PIC )
30 )
,黑色)
It probably doesn't work because your parens aren't balanced. 这可能不起作用,因为您的parens不平衡。 You have 3 open-parens and 5 close-parens. 您有3个开放式括号和5个封闭式括号。
Perhaps this is what you meant instead? 也许这就是您的意思?
blk = makeEmptyPicture(getWidth(pic)+30, getHeight(pic)+30, black)
尝试这个:
blk = makeEmptyPicture((getWidth(pic)+30), (getHeight(pic)+30), black)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.