Changes between Version 35 and Version 36 of ControlSystems/SoftwareTeam/IntroToPython


Ignore:
Timestamp:
Sep 4, 2017, 6:42:59 PM (8 years ago)
Author:
cdelgigante
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/IntroToPython

    v35 v36  
    180180score!
    181181}}}
    182 I'll give you three hints:   
    183 1 You can tell a print to not end with a new line by adding an end="" to the print statement, like ''print("Im a teapot!",end="").   
    184 1 An empty print statement (''print("")'' just prints a new line.
    185 1 If you want to loop over a set of numbers, use range().  For example for i in range(1,10) will make i go from 1 to 10 incrementing 1 each time.
     182Yeah, this is a little, harder, but I bet you can do it.  Ask a neighbor for help if you need to.  I'll give you three hints: 
    186183
    187 Yeah, this is a little, harder, but I bet you can do it.  Ask a neighbor for help if you need to.   Answer is [wiki:ProgrammingAnswerPotatoExercise here].
     184 1. You can tell a print to not end with a new line by adding an end="" to the print statement, like `print("Im a teapot!",end="")`''. ''
     185 1. An empty print statement `print("")` just prints a new line.
     186 1. ''If you want to loop over a set of numbers, use `range()`.''` For example for i in range(1,10) will make i go from 1 to 10 incrementing 1 each time.`
     187
     188
     189
     190 Answer is [wiki:ProgrammingAnswerPotatoExercise here].
    188191
    189192----