From 02d3f6e12380e82852574313b3eae6d6fbf2f019 Mon Sep 17 00:00:00 2001 From: liukai234 Date: Sat, 23 May 2020 17:48:45 +0800 Subject: [PATCH] add model --- .../creat_input.cpp" | 19 ------------------- .../model.py" | 19 +++++++++++++++++++ ...27\345\222\214\345\207\275\346\225\260.py" | 7 ++----- 3 files changed, 21 insertions(+), 24 deletions(-) delete mode 100644 "\345\234\206\345\234\206\347\232\204py/creat_input.cpp" create mode 100644 "\345\234\206\345\234\206\347\232\204py/model.py" diff --git "a/\345\234\206\345\234\206\347\232\204py/creat_input.cpp" "b/\345\234\206\345\234\206\347\232\204py/creat_input.cpp" deleted file mode 100644 index 3e2a2b5..0000000 --- "a/\345\234\206\345\234\206\347\232\204py/creat_input.cpp" +++ /dev/null @@ -1,19 +0,0 @@ -/* - * @Description: - * @LastEditors: liukai - * @Date: 2020-05-15 21:20:51 - * @LastEditTime: 2020-05-15 21:24:27 - * @FilePath: /pyFile/圆圆的py/creat_input.cpp - */ -#include -using namespace std; - -int main() { - for(int i = 1;i <= 10; i++) { - for(int j = 0; j < 4; j++) { - std::cout << i << " "; - } - std::cout << std::endl; - } - return 0; -} \ No newline at end of file diff --git "a/\345\234\206\345\234\206\347\232\204py/model.py" "b/\345\234\206\345\234\206\347\232\204py/model.py" new file mode 100644 index 0000000..82fd463 --- /dev/null +++ "b/\345\234\206\345\234\206\347\232\204py/model.py" @@ -0,0 +1,19 @@ +''' +@Description: +@LastEditors: liukai +@Date: 2020-04-24 19:40:51 +@LastEditTime: 2020-05-08 20:19:57 +@FilePath: /pyFile/test.py +''' +# x = map (lambda x: x * x if x % 2 == 0 else 0 , range(10)) +# print([y for y in x]) + +if __name__ == "__main__": + list = [] + for i in range(10): + list.append(int(input())) + list.sort(reverse=True) + print(list[0:1]) + +def test(): + print("Hello python") \ No newline at end of file diff --git "a/\345\234\206\345\234\206\347\232\204py/\346\250\241\345\235\227\345\222\214\345\207\275\346\225\260.py" "b/\345\234\206\345\234\206\347\232\204py/\346\250\241\345\235\227\345\222\214\345\207\275\346\225\260.py" index b85ceb0..44dce7d 100644 --- "a/\345\234\206\345\234\206\347\232\204py/\346\250\241\345\235\227\345\222\214\345\207\275\346\225\260.py" +++ "b/\345\234\206\345\234\206\347\232\204py/\346\250\241\345\235\227\345\222\214\345\207\275\346\225\260.py" @@ -6,7 +6,7 @@ @FilePath: /pyFile/模块和函数.py ''' -from 完数 import call # 模块导入,如果模块中有主函数,会自动执行模块 +from model import test # 模块导入,如果模块中有主函数,会自动执行模块 import random # 随机数 sum = 0 answer = random.randint(1, 100) @@ -27,7 +27,4 @@ def fac(a = 1, b = 10): # 从模块'完数'中导入call函数 if __name__ == "__main__": fac(5) # 带有默认参数的函数 - n = 100 - for ite in range(1, n + 1, 1): - if call(ite) == True: - print(ite) + test()