Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Name reader.
Wanted to make a code in python that will print a name that you input. Can someone tell me what I did wrong? input = name1 name1 = float(input("Enter a nameā) print(āname1ā) Sorry if this is a basic question, just trying to wrap my head around this.
3 Respostas
+ 1
I see two errors, 1Ā° you defined a variable name1 as a float number (line 2), 2Ā° when you write "number" the print statement is set to print a string but not a variable number1 (line 3).
+ 2
change float to str. Name is mostly represented as string
+ 1
Float is for decimal numbers not strings such as names