Problem "Palindrome". Python
📁 string, Advanced Python Topics, example
Problem: Given a string, determine whether it is a palindrome (i.e., whether it reads the same forwards and backwards).
Input The input is a string without spaces. The length of the string does not exceed 200. Letters of different cases are considered different.
Output You need to output yes if the string is a palindrome, and no otherwise.
Example:
abba yes
qwerq no
slovo = str(input())x = len(slovo)i = 0x = x - 1k = 0while x - i >= i: if slovo[x - i] == In the loop
for row_v in range(6):You are simultaneously incrementing the x coordinate and the y coordinate
x_v_0 += widthy_v_0 += heightx_v_1 += widthy_v_1 += heightBut you need to treat such a wall as a two-dimensional array, i.e., first we go through the first row and draw vertical lines, while the y coordinate does not change, only the x coordinate changes. When moving to the next row, y increases, and x resets to zero. At the same time, to get a truly similar brick wall, you need to through st
Log in to leave an answer
Blogs
How to Pass a TypeScript Interview: Top Questions
Conquering `window` in TypeScript: How to Add Your Own Property Without Breaking the Code
Deploying C# Application on VPS: Advanced Level
Generics in Rust: Don't Fear Abstractions, Write Code Like a Pro