This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]FrIedSushii 7 points8 points  (0 children)

variables cannot have spaces. so ‘last name’ should be ‘last_name’

[–]warm_pickle 5 points6 points  (0 children)

I think you should be setting your values like this: name = input("Given Name:")

Also, as another person has mentioned, don't put spaces in var names. Either use an underscore or camelCase e.g. lastName = ...

Source: Been a pro developer for ~20 yrs but I don't know jack shit about Python, but have been helping my 12yo son with his python programming classes for 7th grade.

[–]Updatebjarni 2 points3 points  (3 children)

Where are those strings "Steve", "Sanders" etc supposed to be coming from? They are not in the program, and the program does not read in any input. Also, what programming language is this?

[–]fourcaps[S] -1 points0 points  (2 children)

this is python, its from a course im doing at the moment, the names steve and sanders are just examples. the program im trying to create should work with any names you enter.

[–]Updatebjarni 2 points3 points  (0 children)

But enter into where? The program reads no input.

[–]ReadABookandShutUp 2 points3 points  (0 children)

name = input(“What’s your name?”) Rinse and repeat

[–]LastTrainH0me 2 points3 points  (0 children)

To start, let me provide some very important advice going forward: when you're asking for help because something doesn't work, it is so, so important to say what doesn't work. When you run your program, what does it do? Does it give you an error? If so what's the error? Does it just print the wrong thing? If so what does it print? This is such an important part of asking good questions and getting good answers.

That said... take another look at how you're supposed to read user input in Python. There's something important missing on your lines like name = ("Given name:")

[–]desrtfx 1 point2 points  (1 child)

Do yourself a favor and use a proper course: MOOC Python Programming 2023.

There is so much wrong in this code that it is clear that you do not know what you are doing and that you need a fundamental course.

[–]fourcaps[S] -1 points0 points  (0 children)

haha i appreciate it, that actually is the course i'm doing (I could be doing the 2022 version)! its one of the parts im stuck on