Couldn’t we just put our name within the print program as opposed to a different line?
Well, that would not be following the instructions to the letter, which you might find around here goes a long way to a good learning experience.
The lesson shows us how a variable can be assigned with a value, then interpolated into a string and outputed to the console.
There are a number of concepts demonstrated…
Thanks Roy! I’m a beginner and just wanted to be the guy to ask questions about everything for better understanding. Kind of self-teaching/ learning this stuff, not the easiest task.
With more experience the usefulness of this will become understood. It’s a small part of a bigger picture.
Is it necessary to write a variable as my_name, can’t we write like my name?
@giga0346789029, variable names, among other constraints, must include no spaces.
Thanks for help, it means a lot.
Good question for a newbie programmer, the answer would be… best to use variables sometimes for programs. imagine the script is much longer and your name appears at other areas. instead of updating all those lines of code you just update the variable at the top. It would save time and cascade to the rest of the code.