Python在线运行

版本:

编辑于 2025-03-03 17:28 累计访问:2106
点击了解高性能代码运行API
运行结果
代码简介
代码仓库
极速运行
终端运行
图形+终端

                        
用户最新保存的代码
查看更多

作者 七亓祁琪(990913)
编辑于:2025-03-03 17:28

import random

while True: num1 = random.randint(1000, 1400) num2 = random.randint(1000, 1400) num3 = random.randint(1000, 1400) num4 = random.randint(1000, 1400) num5 = 6017 - num1 - num2 - num3 - num4 if 1000 <= num5 <= 1400: break

print(f"生成的5个数值分别为: {num1}, {num2}, {num3}, {num4}, {num5}") print(f"它们的总和为: {num1 + num2 + num3 + num4 + num5}")

提示:本站严禁涉政、违法等无关技术的内容
发送
搭载国产梦丘操作系统,支持安装软件,在线编程可视化开发软件,无需配置开发环境

点击购买 梦丘固件
  import base64 s1 = "4dsU4douEK5xoU9mCxO3ARE=" s2 = "MaTxo3JkLnOkAG5zqbW=" print(base64.b64decode(s1).decode('utf-8')) print(base64.b64decode(s2).decode('utf-8')) 3598

  # 九九乘法表 for i in range(1, 10): for j in range(1, i + 1): print(f"{j}×{i}={i*j}", end=" ") print() 3320

  <span style="color: purple">if</span> a = <span style="color: orange">1</span> <span style="color: purple">then</span> <span style="color: green">"F#"</span> 8083

  import random while True: num1 = random.randint(1000, 1400) num2 = random.randint(1000, 1400) num3 = random.randint(1000, 1400) num4 = random.randint(1000, 1400) num5 = 6017 - num1 - num2 - num3 - num4 if 1000 <= num5 <= 1400: break print(f"生成的5个数值分别为: {num1}, {num2}, {num3}, {num4}, {num5}") print(f"它们的总和为: {num1 + num2 + num3 + num4 + num5}") 2107

  c = 1 while c <= 100: print(c) c = c + 1 print('输出结束') 1704

  import time def sum(): sz = 0 for i in range(1, 11): sz += i return sz zhoh = sum() print(f"1-10的总和为 : {zhoh}") 4144

  TempStr = input("请输入带有符号的温度值:") if TempStr[-1] in ['F','f']: C = (eval(TempStr[0:-1])-32)/1.8 print("转换后的温度是{:.2f}C".format[C]) elif TempStr[-1] in ['C','c']: F = eval(TempStr[0:-1])*1.8+32 print("转换后的温度是{:.2f}F".format(F)) else: print("输入格式错误") 4105

  def is_all_upper_or_lower(s): n = len(s) count_upper = 0 for i in range(n): if s[i].isupper(): count_upper += 1 if count_upper == 0 or count_upper == n: return True elif s[0].isupper() and count_upper == 1: return True else: return False while True: s = input("请输入用户名:") if True ==is_all_upper_or_lower(s): print("输入正确") else: print("输入错误") 4562

  import math # 导入 math 模块 print "math.pow(100, 2) : ", math.pow(100, 2) 4559

  while True,continue break,if else 1103

  #inclde<stdio.h> main() { int num=0; while(num<=2) { num==; printf("%d",num): } } 1751

  #inclde<stdio.h> main() { int num=0; while(num<=2) { num==; printf("%d",num): } } 3251

为表和视图生成Java实体类
生成项目的JavaDoc引用
为 Yii Framework 创建生成 ActiveRecord 的代码模板