沈陈成 发表于 2022-9-3 17:26:40

沈陈成 实验小学 514

本帖最后由 沈陈成 于 2024-4-27 16:50 编辑

沈陈成 实验小学 514

沈陈成 发表于 2022-9-24 17:33:37

a=int(input('uhsdfuilurgy'))
if a<=10:

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

    c=b*2.5
    print(2.5+c)

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

沈陈成 发表于 2023-4-1 17:31:50

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)





沈陈成 发表于 2023-4-1 17:32:29

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)





丁宇泽 发表于 2023-12-2 15:56:33

#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;
}

丁宇泽 发表于 2023-12-2 15:57:13

#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;
}

丁宇泽 发表于 2023-12-2 16:12:07

#include <iostream>
#include <iomanip>
using namespace std;

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

沈陈成 发表于 2023-12-2 16:28:47

#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;
}

沈陈成 发表于 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;
}

沈陈成 发表于 2023-12-2 16:31:39

#include<iostream>
using namespace std;
int main(){
    int a,s,d;
    cin>>a>>s>>d;
    cout<<(a+s)/d<<endl;
    return 0;
}
页: [1] 2 3
查看完整版本: 沈陈成 实验小学 514