0
int
what do they do with the code? for example: (taken out of a course) ----------------------------------------------------------------------------------------- name = input() age = int(input()) is_adult = True ----------------------------------------------------------------------------------------- and i don' understand aaaaaaaaaaaaahhhhhhhhhhh also i already answered this question but i need to know the what this means t do better at the courses.
2 Antworten
+ 2
print ("python")
The first input is a string
The second input is a whole number
And the third line is a boolean...
0
"Name" will be the variable where the input data will be stored, but when using input() the data that will be stored will always be a string, that is why in the second line where the "age" is, "int" appears so that the input that is a string is converted to an integer and then in "is_adult" which is the third variable in your third line what you are doing is storing a boolean in said variable, I hope this helps you with your learning path