摘要:
任务一#include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 397 #define N2 476 #define N3 21 int main() { int cnt; int random_m 阅读全文
摘要:
任务一 #include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; } 阅读全文
摘要:
实验一 class Account: #一个模拟银行账户的简单类 def __init__(self, name, account_number,initial_amount = 10): self._name = name self._card_no = account_number self._ 阅读全文
摘要:
with open('data6.csv','r',encoding='gbk')as f: data=list(f.readlines()) data=[i.strip('\n') for i in data ] import decimal decimal.getcontext().roundi 阅读全文
摘要:
任务1 from turtle import* def move(x,y): penup() goto(x,y) pendown() def draw(n,size=100): for i in range(n): fd(size) left(360/n) def main(): pensize(2 阅读全文
摘要:
print(sum) sum=42 print(sum) def inc(n): sum=n+1 print(sum) return sum sum=inc(7)+inc(7) print(sum) 1 空白 2 第二行的sum 3 函数里的sum 4 第十行的sum 任务2 def func1(a 阅读全文
摘要:
任务1 import random print('用列表存储随机整数: ') lst = [random.randint(0, 100) for i in range(5)] print(lst) print('\n用集合存储随机整数: ') s1 = {random.randint(0, 100) 阅读全文
摘要:
任务1 x='nba FIFA' print(x.upper()) print(x.lower()) print(x.swapcase()) print() x = 'abc' print(x.center(10,'*')) print(x.ljust(10,'*')) print(x.rjust( 阅读全文
摘要:
print(x,y,z) print('x = %d,y = %d,z=%d'%(x,y,z)) print('x={},y={},z={}'.format(x,y,z)) print(f'x={x},y={y},z={z}') print(x) print(y) print(z) print(x, 阅读全文