摘要:
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 阅读全文
摘要:
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" 阅读全文
摘要:
>>> tag = True >>> test1 = {} >>> type(test1) <class 'dict'> >>> while tag: name = input("please input your name: ") mountain = input("which mountain 阅读全文
摘要:
1、 >>> test1 = ["aa","bb","aa","cc","aa","cc","dd","ee"] >>> test1 ['aa', 'bb', 'aa', 'cc', 'aa', 'cc', 'dd', 'ee'] >>> "aa& 阅读全文
摘要:
1、 >>> a = {} >>> while a != "quit": a = input("please input an incredient:") if a != "quit": print(f"{a} will be added!!") please input an incredient 阅读全文
摘要:
>>> 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 阅读全文
摘要:
1、 >>> tag = True >>> while tag: a = input("please input something : ") if a == "quit": tag = False else: print(a) please input something : 100 100 pl 阅读全文
摘要:
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 阅读全文
摘要:
>>> 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 阅读全文
摘要:
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 阅读全文