上一页 1 ··· 330 331 332 333 334 335 336 337 338 ··· 367 下一页
摘要: 1、 #include <stdio.h> int main(void) { int x; do { int i; puts("please input an integer."); printf("i = "); scanf("%d", &i); if (i % 2 == 0) puts("eve 阅读全文
posted @ 2021-01-04 11:46 小鲨鱼2018 阅读(1002) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int i; puts("please input an integer."); printf("i = "); scanf("%d", &i); if (i % 3 == 0) puts("can be devided" 阅读全文
posted @ 2021-01-03 23:40 小鲨鱼2018 阅读(855) 评论(0) 推荐(0) 编辑
摘要: >>> tag = True >>> test1 = {} >>> type(test1) <class 'dict'> >>> while tag: name = input("please input your name: ") mountain = input("which mountain 阅读全文
posted @ 2021-01-02 19:46 小鲨鱼2018 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1、 >>> test1 = ["aa","bb","aa","cc","aa","cc","dd","ee"] >>> test1 ['aa', 'bb', 'aa', 'cc', 'aa', 'cc', 'dd', 'ee'] >>> "aa& 阅读全文
posted @ 2021-01-02 19:10 小鲨鱼2018 阅读(595) 评论(0) 推荐(0) 编辑
摘要: 1、 >>> a = {} >>> while a != "quit": a = input("please input an incredient:") if a != "quit": print(f"{a} will be added!!") please input an incredient 阅读全文
posted @ 2021-01-02 14:28 小鲨鱼2018 阅读(85) 评论(0) 推荐(0) 编辑
摘要: >>> while True: a = input("please input something:") if a == "ab": break else: print(f"you had input {a}.") please input something:100 you had input 1 阅读全文
posted @ 2021-01-02 13:41 小鲨鱼2018 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1、 >>> tag = True >>> while tag: a = input("please input something : ") if a == "quit": tag = False else: print(a) please input something : 100 100 pl 阅读全文
posted @ 2021-01-02 13:20 小鲨鱼2018 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 1、 >>> a = "" >>> while a != "quit": a = input("please input a str or 'quit' to leave: ") print(a) please input a str or 'quit' to leave: 100 100 plea 阅读全文
posted @ 2021-01-02 12:38 小鲨鱼2018 阅读(99) 评论(0) 推荐(0) 编辑
摘要: >>> for i in range(1,11): if i % 4 == 0: print(i) 4 8 >>> for i in range(1,11): if i % 4 == 0: break print(i) 1 2 3 >>> for i in range(1,11): if i % 4 阅读全文
posted @ 2021-01-02 11:15 小鲨鱼2018 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 1、 >>> i = 1 >>> sum = 0 >>> while i <= 100: sum = sum + i i = i + 1 ## 当此处i等于101时循环停止 >>> print(sum) 5050 2、 >>> a = 100 >>> b = int(input("please in 阅读全文
posted @ 2021-01-02 10:43 小鲨鱼2018 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 ··· 330 331 332 333 334 335 336 337 338 ··· 367 下一页