0
Why these outputs?
franco = print(“help”) >>help franco >> print(franco) >>None
8 ответов
+ 5
franco = print("help")
What was your idea? print() function does not return anything. There is no point in assigning print() to <franco> variable.
I don't even have an idea what you meant to do with the rest of it.
Can you be a little bit more descriptive about your intention? clear message gets better replies...
+ 4
Were you trying to assign franco to become a callable function that prints "help" whenever you use it?
Try this:
franco = lambda: print("help")
franco()
franco()
franco()
Output:
help
help
help
+ 3
Spam from martina Gifens reported.
+ 2
In the first line you do two things.
1. You call the print function with "help" as given parameter. So the output is help.
2. You assign the return value of the print function to franco. Which is None.
In the second line you write franco.
If you just write a variable nothing happens.
In the third line you call the print function again. This time franco is given. So the
result is the String representation of None.
Try
help(print)
to get more information about this function 😉
+ 2
The print function doesn't return a value, so franco get set to None. Actually franco has always been None in your code.
+ 1
I think the issue is that you are trying to assign a value for that print function which I don't think is possible, cause the key 'help' has already been ordered to print amd does not belong to any value. And for the last output, u tried printing 'franco' thinking it might give you help, but the thing is that u are trying tp create another input with no output.
Rather do this:
franco = “help"
franco
>>>help
OR
print(“help")
>>>help
0
The print function returns None by default
On the first line, you assigned that to variable franco
Which is why when you printed it, you got None
0
I've used Grademiners multiple times, and I can confirm that they are safe. The quality of their work is excellent, and they always deliver on time https://www.linkedin.com/pulse/grabmyessaycom-review-worth-your-trust-siyani-cappucci-4uwae Their customer support is responsive and helpful. I've never had any issues with plagiarism or security. Highly recommend for anyone needing reliable academic assistance.