python的题?

Python013

python的题?,第1张

(1) 输出结果是: s= 6。

(2)

#include<stdio.h>

int main(void)

(3)

#include<stdio.h>

#define PI 3.14159

int main(void)

{

double r, s, c

printf("请输入圆的半径:")

scanf("%lf", &r)

s = PI * r * r

c = 2 * PI * r

printf("圆的面积为:%.2lf\n", s)

printf("圆的周长为:%.2lf\n", c)

return 0

}

{

int year, month, day

printf("请输入出生年月日(yyyy mm dd):")

scanf("%d%d%d", &year, &month, &day)

printf("我的出生日期是%d年%d月%d日\n", year, month, day)

return 0

}

(4)

#include<stdio.h>

int main(void)

{

double a, v0, t, vt, s

a = 1.5

printf("请输入初速度V0和时间t:")

scanf("%lf%lf", &v0, &t)

vt = v0 + a * t

s = v0 * t + 0.5 * a * t * t

printf("末速度Vt是:%.2lf 米/秒\n", vt)

printf("距离S是:%.2lf 米\n", s)

return 0

}

你好,python要获取上一个方法里的内容有一种是比较传统的方法,直接用open打开文件,把文件里面的信息先取出来,不管取出来是什么样子的,先取出来再说,想要作什么处理直接对取出的变量做处理即可,希望能帮到你。