Skip to content

Spmething's wrong #5019

@Pomidorkins

Description

@Pomidorkins

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

Последние клавиши 3:
 & Space C

Исключение:
System.ArgumentOutOfRangeException: Значение должно быть больше или равно нулю и меньше, чем размер буфера в данной размерности.
Имя параметра: left
Фактическое значение было -2.
   в System.Console.SetCursorPosition(Int32 left, Int32 top)
   в Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)  
   в Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   в Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   в Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   в Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   в Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   в Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Screenshot

i just tried to run this code:
#Запрос предложения у пользователя
str1 = input('Введите строку-палиндром: ')

#Предложение без пробелов
c_str1 = str1.replace(' ', '')

#Предложение с маленькими буквами
l_str1 = c_str1.lower()
print("Обработанная строка:", l_str1)

#Развёрнутое предложение
str2 = l_str1[::-1]
print("Перевернутая строка:", str2)

if str2 == l_str1:
print('true')
else:
print('false')

Environment data

what

Steps to reproduce

just run the code

Expected behavior

answer

Actual behavior

error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions