Python Forum
How to compile following python loop program
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to compile following python loop program
#4
  • ask user for a
  • ask user for b
  • convert the string a and b to an integer
  • for-loop which counts from b to a by -1
  • inside the for loop you calculate the 2nd, 3rd and 4th degree, and then you print the results.

Make two functions.
One to ask the user for a number, and one to do the looping + calculation + output.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: How to compile following python loop program - by DeaD_EyE - Oct-27-2021, 01:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation How to get program to loop if input date is in the past? xander_thornton45 3 1,785 Oct-11-2024, 10:08 AM
Last Post: Pedroski55
  Using If Statements Instead of While Loop in Simple Game Program new_coder_231013 5 5,799 Dec-14-2021, 12:23 AM
Last Post: supuflounder
  RockPaperScissor program while loop malfunction tonyliang19 3 3,856 Apr-03-2020, 11:09 PM
Last Post: SheeppOSU
  Program that, inside a loop, does multiple things. needs to print in a certain way reidmcleod 1 3,323 Feb-19-2019, 02:35 PM
Last Post: marienbad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020