#!/usr/bin/env python3 # -*- coding: utf-8 -*- """练习十九:计算1-2+3...+99中除了88以外所有数的和""" __author__ = ‘Fan Lijun‘ s1 = 0 s2 = 0 for x in range(1, 100, 2): s1 += x for y in range(2, 100, 2): s2 += y print(s1 - s2 + 88)
原文地址:https://www.cnblogs.com/LoveBeautiful/p/10030323.html
时间: 2024-10-04 04:44:00