0

Print("hello ,world!"[7:13][2])

About index

20th Dec 2024, 5:14 PM
Ramya.S Ramya.S
Ramya.S Ramya.S - avatar
9 Answers
+ 1
What about index? Q&A is for asking programming related questions. What is your question? And tag the relevant programming language.
20th Dec 2024, 5:32 PM
Lisa
Lisa - avatar
+ 1
Python is case-sensitive. The function name is print(). It is not Print().
20th Dec 2024, 6:57 PM
Brian
Brian - avatar
0
question=Print("hello ,world!"[7:13][2]) Python
20th Dec 2024, 5:51 PM
Ramya.S Ramya.S
Ramya.S Ramya.S - avatar
0
READ: What is the ⭐️QUESTION ⭐️?
20th Dec 2024, 6:06 PM
Lisa
Lisa - avatar
0
question=Print("hello ,world!"[7:13][2]) Python
20th Dec 2024, 6:18 PM
Ramya.S Ramya.S
Ramya.S Ramya.S - avatar
0
This is not a question; this is code that produces an error. Q&A is not a quiz. What help do you need?
20th Dec 2024, 6:31 PM
Lisa
Lisa - avatar
0
Why
20th Dec 2024, 6:32 PM
Ramya.S Ramya.S
Ramya.S Ramya.S - avatar
0
Why the code give error
20th Dec 2024, 6:32 PM
Ramya.S Ramya.S
Ramya.S Ramya.S - avatar
0
Ramya.S Ramya.S , make sure that you have learned and understand what this code should do (using index notation to get data from the string and slicing parts of a string using start and end index). otherwise it could be helpful if you can repeat some lessons. the given code has some issues: > print(...) has to be in lower case. (as already mentioned by Brian ) > assigning the result of a print(...) statement to a variable does not make much sence, since the stored value is `None' what is the code doing: (i suppose that the code should output a result) > the given string will be sliced from index 7 as a start, upto index 13 as the end, but not including it. > from this result the character with index 2 should be printed.
20th Dec 2024, 7:19 PM
Lothar
Lothar - avatar