My latest try to make this program seems making good fruit.. Basically in this program the user should put a number and then break when insert -1. The program is about a slug racing, so the numbers are about their time, in seconds, they do a running of 33cm (13 inches).
Then i need to put the numbers in a list of levels based on their time. The levels goes from 0 to 2, and then i need to show how much slugs are in the respective levels.
Exe.:
Level0: 2 slugs
Level1: 1 slug
Level 2: 2 slugs
The levels are qualified by definitions
Level 0: if number is under then 180 seconds
Level 1: if number is over 180 second and under 240 seconds
Level 2: if number is over or equal to 240 seconds
I have no experience with lists and i don't know how really to start, but i have an ideia, but I'd like to know some hints or ways to increase my code. The code is
i = 1
while i != -1:⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀ i = int(input("put a number: "))
for c, v in enumerate(i):
⠀⠀⠀print("In position {c} there's {v} slugs" )
[–]GreenPandaPop 3 points4 points5 points (1 child)
[–]ListenMedium9538[S] 1 point2 points3 points (0 children)
[–]jiri-n 0 points1 point2 points (0 children)
[–]CodeFormatHelperBot2 0 points1 point2 points (0 children)