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.

26th Dec 2024, 12:39 AM
print ("python")
print ("python") - avatar
3 Answers
+ 5
The first line is a string, the output will always a string if you only use input() The second line is an integer, with int(), it'll turn the input from string to whole number (integer) The third line is boolean because "True" and "False" are boolean
27th Dec 2024, 5:22 PM
☕︎︎AstroParrot✦
☕︎︎AstroParrot✦ - avatar
+ 4
print ("python") The first input is a string The second input is a whole number And the third line is a boolean...
26th Dec 2024, 12:51 AM
BroFar
BroFar - avatar
+ 1
"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
26th Dec 2024, 1:32 PM
Alejandro Rodriguez
Alejandro Rodriguez - avatar