What is wrong with my python script?

Donald J Trump

Sannin of the Scrolls 📜
Elite
Joined
Dec 7, 2012
Messages
5,982
Reaction score
787
name= print("hello sir what is your name?: ")
wait = input("Press enter to continue")

username= print("that is very nice, now tell me what your user online id is: ")

wait = input("press enter after you are finished.")

print("okay your username is " + username + " and your real name is " + name)

Look this is my script, the first few parts work but than the last part does not it comes up with "TypeError: Can't convert 'NoneType' object to str implicitly" First part with the name and username works but at the end it does not!




TypeError: Can't convert 'NoneType' object to str implicitly
 

sistyN

Member
Joined
Mar 24, 2011
Messages
247
Reaction score
19
bCuz it doesn't assign type to username and name
 

sistyN

Member
Joined
Mar 24, 2011
Messages
247
Reaction score
19
I suck balls at this!
I hope it helps you , i'm suck at explaining .:eww:
>>> def foo():
print('hello')


>>> myFunc = foo
>>> myFunc
<function foo at 0x000000000302FF28>
>>> myFunc()
hello
>>> wtf = foo()
hello
>>> wtf
>>> type(myFunc)
<class 'function'>
>>> type(wtf)
<class 'NoneType'>
>>>
 
Last edited:

gustawho

Member
Joined
Oct 10, 2012
Messages
120
Reaction score
11
If you need more help, you can ask in .
 

Wabbit

Banned
Legendary
Joined
Nov 15, 2011
Messages
11,335
Reaction score
797
name= raw_input("hello sir what is your name?: ")
raw_input("Press enter to continue")

username= raw_input("that is very nice, now tell me what your user online id is: ")

raw_input("press enter after you are finished.")

print("okay your username is " + username + " and your real name is " + name)
you gotta use raw_input to store strings in variables..input() doesnt take strings...
 
Top