0% found this document useful (0 votes)
6 views

Online Python Compiler (Interpreter) - Programiz

The document contains a Python code snippet that prompts the user to input the distance they ran each day for a week. It calculates the total distance run over the week and tracks the longest distance. The code initializes variables for distance, total distance, and day count, and iterates through a loop for seven days.

Uploaded by

seonamy40
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Online Python Compiler (Interpreter) - Programiz

The document contains a Python code snippet that prompts the user to input the distance they ran each day for a week. It calculates the total distance run over the week and tracks the longest distance. The code initializes variables for distance, total distance, and day count, and iterates through a loop for seven days.

Uploaded by

seonamy40
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Programiz

Python Online PRO ›


Compiler

main.py Run Output Clear

1 distance=0
2 total_distance=0
3 longest_distance=0
4 day = 0
5 for i in range(7):
6 day = day+1
7 print("Day",day)
8 distance=int(input("Enter the distance you ran
today: "))
9 total_distance =distance + total_distance
10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy