找回密码
 中文实名注册
查看: 796|回复: 29

沈陈成 实验小学 514

[复制链接]

15

主题

131

帖子

3383

积分

论坛元老

Rank: 8Rank: 8

积分
3383
发表于 2022-9-3 17:26:40 | 显示全部楼层 |阅读模式
本帖最后由 沈陈成 于 2024-4-27 16:50 编辑

沈陈成 实验小学 514

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?中文实名注册

x
回复

使用道具 举报

15

主题

131

帖子

3383

积分

论坛元老

Rank: 8Rank: 8

积分
3383
 楼主| 发表于 2022-9-24 17:33:37 | 显示全部楼层
[Python] 纯文本查看 复制代码
a=int(input('uhsdfuilurgy'))
if a<=10:

    print('2.5')
else:
    b=a-10

    c=b*2.5
    print(2.5+c)


1011: 【入门】行礼托运价格
回复

使用道具 举报

15

主题

131

帖子

3383

积分

论坛元老

Rank: 8Rank: 8

积分
3383
 楼主| 发表于 2023-4-1 17:31:50 | 显示全部楼层
[Python] 纯文本查看 复制代码
import turtle
import random
turtle.speed(0)
def rectangle(width,hight):
    turtle.pendown()
    color = ['red', 'yellow', 'blue', 'white', 'white', 'white', 'white']
    turtle.fillcolor(random.choice(color))
    turtle.begin_fill()
    for i in range(2):
        turtle.forward(width)
        turtle.left(90)
        turtle.forward(hight)
        turtle.left(90)
    turtle.end_fill()
    turtle.penup()
width_list=[]
hight_list=[]
for i in range(5):
    width_list.append(random.randint(100,120))
    hight_list.append(random.randint(60,90))
print(width_list)
print(hight_list)





回复

使用道具 举报

15

主题

131

帖子

3383

积分

论坛元老

Rank: 8Rank: 8

积分
3383
 楼主| 发表于 2023-4-1 17:32:29 | 显示全部楼层
[Python] 纯文本查看 复制代码
import turtle
import random
turtle.speed(0)
def rectangle(width,hight):
    turtle.pendown()
    color = ['red', 'yellow', 'blue', 'white', 'white', 'white', 'white']
    turtle.fillcolor(random.choice(color))
    turtle.begin_fill()
    for i in range(2):
        turtle.forward(width)
        turtle.left(90)
        turtle.forward(hight)
        turtle.left(90)
    turtle.end_fill()
    turtle.penup()
width_list=[]
hight_list=[]
for i in range(5):
    width_list.append(random.randint(100,120))
    hight_list.append(random.randint(60,90))
print(width_list)
print(hight_list)





回复

使用道具 举报

2

主题

110

帖子

1509

积分

金牌会员

Rank: 6Rank: 6

积分
1509
QQ
发表于 2023-12-2 15:56:33 | 显示全部楼层
[C++] 纯文本查看 复制代码
#include<iostream>
using namespace std;
int main(){
    double y,x;
    cin>>x;
    if (x>0 && x<5){
        y=(x+(2.5-x-x));
    }else if(x>=5 && x<10){
        y=(2-1.5*(x-3)*(x-3));
    }else if(x>=10 && x<20){
        y=(x/2-1.5);
    }
     printf("%.3f",y);
     return 0;
}
回复

使用道具 举报

2

主题

110

帖子

1509

积分

金牌会员

Rank: 6Rank: 6

积分
1509
QQ
发表于 2023-12-2 15:57:13 | 显示全部楼层
[C++] 纯文本查看 复制代码
#include<iostream>
#include<cmath>
using namespace std;
int main(){
    double salary;
    double tax,income;
    cin>>salary;
    if (salary<3500){
        cout<<0<<" "<<salary<<endl;}
    else{
        salary=salary-3500;}
    if (salary<=1500){
        tax=salary*0.03-0;
        income=salary-tax;}
    else if(salary<=4500){
         tax = salary *0.1-105;
         income = salary - tax ;
         cout<<tax<<" "<<income+3500;}
    else if (salary >4500 && salary<=9000){
         tax = salary *0.2-555;
         income = salary - tax ;
         cout<<tax<<" "<<income+3500;}
    else if ( salary <=35000){
         tax = salary *0.25-1005;
         income = salary - tax ;
         cout<<tax<<" "<<income+3500;}
    else if ( salary <=55000){
         tax = salary *0.3-2755;
         income = salary - tax ;
         cout<<tax<<" "<<income+3500;}
    else if ( salary <=80000){
         tax = salary *0.35-5505;
         income = salary - tax ;
         cout<<tax<<" "<<income+3500;}
    else if ( salary >80000){
         tax = salary *0.45-13505;
         income = salary - tax ;
         cout<<tax<<" "<<income+3500;}
    return 0;
}
回复

使用道具 举报

2

主题

110

帖子

1509

积分

金牌会员

Rank: 6Rank: 6

积分
1509
QQ
发表于 2023-12-2 16:12:07 | 显示全部楼层
[C++] 纯文本查看 复制代码
#include <iostream>
#include <iomanip>
using namespace std;

int main() {
double a[100],total=0;
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[i];
        total+=a[i];
    }
    cout<<fixed<<setprecision(4)<<total/n<<endl;
    return 0;
} 
回复

使用道具 举报

15

主题

131

帖子

3383

积分

论坛元老

Rank: 8Rank: 8

积分
3383
 楼主| 发表于 2023-12-2 16:28:47 | 显示全部楼层
[C++] 纯文本查看 复制代码
#include<iostream>
#include <iomanip>
using namespace std;
int main(){
    double a,s,d,f;
    double z;
        
    cin>>a>>s>>d>>f;
    z=(d*f-a*s)/(f-s);
    cout <<fixed<<setprecision(2)<<z<<endl;
    return 0;
}
回复

使用道具 举报

15

主题

131

帖子

3383

积分

论坛元老

Rank: 8Rank: 8

积分
3383
 楼主| 发表于 2023-12-2 16:31:01 | 显示全部楼层
#include<iostream>
using namespace std;
int main(){
    int a,s,d;
    cin>>a>>s>>d;
    cout<<(a+s)*d<<endl;
    return 0;
}
回复

使用道具 举报

15

主题

131

帖子

3383

积分

论坛元老

Rank: 8Rank: 8

积分
3383
 楼主| 发表于 2023-12-2 16:31:39 | 显示全部楼层
[C++] 纯文本查看 复制代码
#include<iostream>
using namespace std;
int main(){
    int a,s,d;
    cin>>a>>s>>d;
    cout<<(a+s)/d<<endl;
    return 0;
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

小黑屋|东台市机器人学会 ( 苏ICP备2021035350号-1;苏ICP备2021035350号-2;苏ICP备2021035350号-3 )

GMT+8, 2024-4-29 18:11 , Processed in 0.047470 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表