Ok, I'm not finding any info. on the int() for converting a str to an int (that specifies a base parameter)?! The picture is of the code I've written... And the base 10 paradigm involved?? years = int('y') # store for calculation ValueError: invalidliteral for int() with base 10: 'y'
Ok, I'm not finding any info. on the int() for converting a str to an int (that specifies a base parameter)?! The picture is of the code I've written... And the base 10 paradigm involved?? years = int('y') # store for calculationValueError: invalidliteral for int() with base 10: 'y'What is meant by "invalid literal"? I'm trying to convert srt to int, and I didn't know I needed to specify the base. Plus I haven't read anything that I need to specify the base for the int().
Attached is the code, showing the code and the execution of said code.
Ok, I'm not finding any info. on the int() for converting a str to an
int (that specifies a base parameter)?!
The picture is of the code I've written...
And the base 10 paradigm involved??
years = int('y') # store for calculationValueError: invalid
literal for int() with base 10: 'y'What is meant by "invalid literal"?
I'm trying to convert srt to int,
and I didn't know I needed to specify the base.
Plus I haven't read anything that I need to specify
the base for the int(). Attached is the code, showing the code and
the execution of said code.
"When you pass through the waters, I will
be with you: and when you pass through the rivers, they will not sweep over you. When you walk through the fire, you will not be burned: the flames will not set you ablaze." Isaiah 43:2
Ok, I'm not finding any info. on the int() for converting a str to
an int (that specifies a base parameter)?!
The picture is of the code I've written... And the base 10 paradigm involved??
years = int('y') # store for calculationValueError:
invalid literal for int() with base 10: 'y'What is meant by "invalid literal"?
I'm trying to convert srt to int, and I didn't know I needed to
specify the base.
Plus I haven't read anything that I need to specify the base for the int().
Attached is the code, showing the code and the execution of said
code.
"When you pass through the waters, I will be with you: and
when you pass through the rivers, they will not sweep
over you. When you walk through the fire, you will not be burned:
the flames will not set you ablaze." Isaiah 43:2
Ok, I'm not finding any info. on the int() for converting a str to an int (that specifies a base parameter)?! The picture is of the code I've written... And the base 10 paradigm involved?? years = int('y') # store for calculationValueError: invalidliteral for int() with base 10: 'y'What is meant by "invalid literal"? I'm trying to convert srt to int, and I didn't know I needed to specify the base. Plus I haven't read anything that I need to specify the base for the int().
"Kevin M. Wilson" <kevinmwilson1956@yahoo.com> writes:[...]
Ok, I'm not finding any info. on the int() for converting a str to an
int (that specifies a base parameter)?!
https://docs.python.org/3/library/functions.html#int
On 2023-05-25, Kevin M. Wilson via Python-list <python-list@python.org> wrote:
Ok, I'm not finding any info. on the int() for converting a str to
an int (that specifies a base parameter)?!
Where are you looking?
https://docs.python.org/3/library/functions.html#int
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 78:22:29 |
Calls: | 6,716 |
Files: | 12,247 |
Messages: | 5,357,829 |