-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreplaced_with.py
More file actions
52 lines (49 loc) · 2.28 KB
/
replaced_with.py
File metadata and controls
52 lines (49 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
= RESTART: C:/TC/BIN/tito/PYTHON/exchange_first_to_last.py
python
nythonp
=========== RESTART: C:/TC/BIN/tito/PYTHON/exchange_first_to_last.py ===========
python
nythop
=============== RESTART: C:/TC/BIN/tito/PYTHON/replaced_with_$.py ==============
enter a string for modification : python
Traceback (most recent call last):
File "C:/TC/BIN/tito/PYTHON/replaced_with_$.py", line 4, in <module>
print(first + "$" * length -1)
TypeError: unsupported operand type(s) for -: 'str' and 'int'
>>>
=============== RESTART: C:/TC/BIN/tito/PYTHON/replaced_with_$.py ==============
enter a string for modification : python
Traceback (most recent call last):
File "C:/TC/BIN/tito/PYTHON/replaced_with_$.py", line 4, in <module>
print(first + "$" * length -1)
TypeError: can't multiply sequence by non-int of type 'str'
>>>
=============== RESTART: C:/TC/BIN/tito/PYTHON/replaced_with_$.py ==============
enter a string for modification : python
Traceback (most recent call last):
File "C:/TC/BIN/tito/PYTHON/replaced_with_$.py", line 5, in <module>
last = "$" * length -1
TypeError: unsupported operand type(s) for -: 'str' and 'int'
>>>
=============== RESTART: C:/TC/BIN/tito/PYTHON/replaced_with_$.py ==============
enter a string for modification : python
Traceback (most recent call last):
File "C:/TC/BIN/tito/PYTHON/replaced_with_$.py", line 5, in <module>
last = "$" * length -1
TypeError: unsupported operand type(s) for -: 'str' and 'int'
>>>
=============== RESTART: C:/TC/BIN/tito/PYTHON/replaced_with_$.py ==============
enter a string for modification : python
Traceback (most recent call last):
File "C:/TC/BIN/tito/PYTHON/replaced_with_$.py", line 5, in <module>
last = "$" * length -1
TypeError: unsupported operand type(s) for -: 'str' and 'int'
>>>
============= RESTART: C:/TC/BIN/tito/PYTHON/replaced_with_$.py =============
enter a string for modification : python
Traceback (most recent call last):
File "C:/TC/BIN/tito/PYTHON/replaced_with_$.py", line 6, in <module>
last = replace * length -1
TypeError: unsupported operand type(s) for -: 'str' and 'int'