answersLogoWhite

0

this is the program I'm trying to loop

#Speed

Speed =input('Speed in MPH:')

#Distance

Time= input('Time in hours:')

# floating point number

Speed = float(Speed)

# floating point number6

Time = float(Time)

#Calc

Distance=Speed*Time

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

How do you loop a program in python 3?

A program can be looped in Python by wrapping the entire program in a for or while loop. If you wish to loop the program a finite amount of times, it can be done like so (x = the amount of times you want it to loop, this can be a number or variable storing a number): for i in range(0,x): [code] If you wish to loop the program infinitely, you can use a simple while loop: while True: [code]


How do you loop a program in python?

An infinite loop might look something like: while 1==1: print("Infinite loop") as 1 is ALWAYS equal to 1.


What is a Python loop?

A Python loop is something that will always happen or continue to happen until the condition isn't met. So for example:while 1==1:print("Infinite loop")would be an infinite loop, as 1 will ALWAYS be equal to 1.


How can Python's parfor feature be utilized to optimize parallel processing in a program?

Python's parfor feature can be utilized to optimize parallel processing in a program by allowing for the execution of multiple iterations of a loop simultaneously. This can help improve the efficiency of the program by distributing the workload across multiple processors or cores, leading to faster execution times.


Write a program using a loop to output all the letters of the alphabet in uppercase?

Here's the code for your program: # Loop through the uppercase alphabet letters for letter in range(ord('A'), ord('Z') + 1): print(chr(letter)) BTW you can use this code in Python and try it out for yourself.


How can I parallelize a for loop in Python for improved performance?

To parallelize a for loop in Python for improved performance, you can use libraries like multiprocessing or concurrent.futures to split the loop iterations across multiple CPU cores. This allows the loop to run concurrently, speeding up the overall execution time.


How can Python parallel processing be implemented within a for loop?

Python parallel processing within a for loop can be implemented using the concurrent.futures module. By creating a ThreadPoolExecutor and using the map function, you can execute multiple tasks concurrently within the for loop. This allows for faster execution of the loop iterations by utilizing multiple CPU cores.


How do you make a program in python using do while loop to display the multiplication table of number from one to ten?

a = 0while a < 10 :a += 1print (a)Write the above simple script in a text editor (I use nano). Save as loop.py in home folder. To run, open a terminal and at the prompt, write: python loop.pyResult:rodney@downstairs:~$ python loop.py12345678910


What has the author Wesley Chun written?

Wesley Chun has written: 'Python fundamentals' -- subject(s): Python (Computer program language) 'Core Python programming' -- subject(s): Python (Computer program language)


Do you need Python in your PC?

Python is just a programming software, you don't actually need it to run your computer. You can use Python if you'd like to program something, or learn how to program.


A program with a loop that never ends is called an?

Infinite loop.


How can parallel processing be implemented in Python using a for loop?

Parallel processing in Python can be implemented using the multiprocessing module. By creating multiple processes within a for loop, each process can execute a task concurrently, allowing for parallel processing.