You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment
Build of Visual Studio: 18.13.0 Canary [12309.413.main]
Build of Python Package: 18.0.26285.1
Version of Pylance: 2026.4.100
OS version: Windows 11 Enterprise, version 25H2
Create a new python application
Input some codes
from math import cos, radians
# Create a string with spaces proportional to a cosine of x in degrees
def make_dot_string(x):
rad = radians(x) # cos works with radians
numspaces = int(20 * cos(radians(x)) + 20) # scale to 0-40 spaces
st = ' ' * numspaces + 'o' # place 'o' after the spaces
return st
def main():
for i in range(0, 1800, 12):
s = make_dot_string(i)
print(s)
main()
Select the lines of code or expression to extract into a separate method
Observes
Expected behavior
An symbol like this should display.
Additional context and screenshots
No response when refactor code
Activity