标题:在ipython中使用脚本发现type(x)无法显示内容
只看楼主
glaciya
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2019-10-8
结帖率:33.33%
 问题点数:0 回复次数:6 
在ipython中使用脚本发现type(x)无法显示内容
[root@linux py_project]# cat test2.py
#test2.py


print("Please input 3 values")

number1=int(input("Please input the first number"))
number1
number2=int(input("Please input the second number"))
number2
number3=int(input("Please input the third number"))
number3


minimal=number1

if number2<=minimal:

      minimal=number2

if number3<=minimal:

      minimal=number3


print("The minimum number is",minimal)




[root@linux py_project]# vim test2.py
[root@linux py_project]# cat test2.py
#test2.py


print("Please input 3 values")

number1=int(input("Please input the first number"))
number1
number2=int(input("Please input the second number"))
number2
number3=int(input("Please input the third number"))
number3


minimal=number1

if number2<=minimal:

      minimal=number2
      type(minimal)
if number3<=minimal:

      minimal=number3
      type(minimal)

print("The minimum number is",minimal)
type(minimal)



[root@linux py_project]# ipython test2.py
Please input 3 values
Please input the first number12
Please input the second number34
Please input the third number22
The minimum number is 12
搜索更多相关主题的帖子: the int Please number input 
2019-10-08 18:21
wp231957
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:神界
等 级:版主
威 望:422
帖 子:13681
专家分:53296
注 册:2012-10-18
得分:0 
很有可能是那个分支没有进入

DO IT YOURSELF !
2019-10-08 19:55
glaciya
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2019-10-8
得分:0 
回复 楼主 glaciya
请问进入您说的进入是否是进入编译器?
2019-10-08 21:17
wp231957
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:神界
等 级:版主
威 望:422
帖 子:13681
专家分:53296
注 册:2012-10-18
得分:0 
啥是分支结构不知道吗?

DO IT YOURSELF !
2019-10-08 21:24
glaciya
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2019-10-8
得分:0 
回复 4楼 wp231957
请大神指点分支结构。或者抛个链接我好好看看。
2019-10-08 23:24
wp231957
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:神界
等 级:版主
威 望:422
帖 子:13681
专家分:53296
注 册:2012-10-18
得分:0 
回复 5楼 glaciya
话说 type这个函数 貌似只有再shell环境下有效   再运行环境下无效   所以不显示正常

DO IT YOURSELF !
2019-10-09 08:25
glaciya
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2019-10-8
得分:0 
回复 6楼 wp231957
谢谢,已经理解。
2019-10-09 20:26



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-497142-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.571186 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved