Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python_study
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Minseong Kwon
python_study
Commits
51237426
Commit
51237426
authored
6 years ago
by
Minseong Kwon
Browse files
Options
Downloads
Patches
Plain Diff
Update input_test2 결과.txt
parent
b961cb51
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
input_test2 결과.txt
+0
-131
0 additions, 131 deletions
input_test2 결과.txt
with
0 additions
and
131 deletions
input_test2 결과.txt
+
0
−
131
View file @
51237426
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
>>> 10
10
>>> 20
20
>>> 10
10
2
>>> 0
0
2
>>> 02
SyntaxError: invalid token
>>> 20
20
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
>>> a
'10'
>>> b
'20'
>>> type(a)
<class 'str'>
>>> type(b)
<class 'str'>
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
>>> a
'10'
>>> b
'20'
>>> result
200
>>> type(a)
<class 'str'>
>>> print(result)
200
>>> a+b
'1020'
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
10*20=200
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
10*20=200
10*20=200
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
10*20=200
10*20=200
10*20=200
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
10*20=200
10*20=200
10*20=200
Traceback (most recent call last):
File "C:/Users/권민성/Desktop/python/Input_test2.py", line 16, in <module>
print(a*b)
TypeError: can't multiply sequence by non-int of type 'str'
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
10*20=200
10*20=200
10*20=200
200
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
두번째 수를 입력하세요
20
10*20=200
10*20=200
10*20=200
200
Traceback (most recent call last):
File "C:/Users/권민성/Desktop/python/Input_test2.py", line 18, in <module>
print(a+"*"+b+"="+result)
TypeError: can only concatenate str (not "int") to str
>>>
============ RESTART: C:/Users/권민성/Desktop/python/Input_test2.py ============
첫번째 수를 입력하세요
10
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment