From e1d5ab84d8eb303c62b4b2ef7ef1b8371c686259 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 13 Sep 2015 02:27:45 -0300 Subject: [PATCH] no message --- Module10Lists/Module10Lists.sln | 4 +-- .../Module10Lists/Module10Lists.pyproj | 9 ++++-- .../Module13Functions/helpers.py | 1 + PythonApplication3/PythonApplication3.sln | 2 +- .../PythonApplication3.pyproj | 2 +- Solutions/Module5DeadlineChallengeSolution.py | 28 +++++++++---------- .../Module9EtchASketchChallengeSolution.py | 28 +++++++++---------- .../module4WorkingWithNumbers.sln | 2 +- .../module4WorkingWithNumbers.pyproj | 2 +- 9 files changed, 41 insertions(+), 37 deletions(-) diff --git a/Module10Lists/Module10Lists.sln b/Module10Lists/Module10Lists.sln index fac51a6..903f1b9 100644 --- a/Module10Lists/Module10Lists.sln +++ b/Module10Lists/Module10Lists.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "Module10Lists", "Module10Lists\Module10Lists.pyproj", "{693EB94A-39ED-4936-9E76-5859D192CC07}" EndProject diff --git a/Module10Lists/Module10Lists/Module10Lists.pyproj b/Module10Lists/Module10Lists/Module10Lists.pyproj index e7449cf..42072ad 100644 --- a/Module10Lists/Module10Lists/Module10Lists.pyproj +++ b/Module10Lists/Module10Lists/Module10Lists.pyproj @@ -1,5 +1,5 @@  - + Debug 2.0 @@ -21,8 +21,13 @@ true false + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets + - + + \ No newline at end of file diff --git a/Module13Functions/Module13Functions/helpers.py b/Module13Functions/Module13Functions/helpers.py index a46040f..0954893 100644 --- a/Module13Functions/Module13Functions/helpers.py +++ b/Module13Functions/Module13Functions/helpers.py @@ -1,3 +1,4 @@ + def getNames(): names = ['Christopher', 'Susan', 'Danny'] newName = input('Enter last guest: ') diff --git a/PythonApplication3/PythonApplication3.sln b/PythonApplication3/PythonApplication3.sln index 7b5341e..8a98c08 100644 --- a/PythonApplication3/PythonApplication3.sln +++ b/PythonApplication3/PythonApplication3.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "PythonApplication3", "PythonApplication3\PythonApplication3.pyproj", "{C9341719-1D4E-4CE1-B25C-D947C4F5A29B}" EndProject diff --git a/PythonApplication3/PythonApplication3/PythonApplication3.pyproj b/PythonApplication3/PythonApplication3/PythonApplication3.pyproj index d91c4a5..092c110 100644 --- a/PythonApplication3/PythonApplication3/PythonApplication3.pyproj +++ b/PythonApplication3/PythonApplication3/PythonApplication3.pyproj @@ -1,5 +1,5 @@  - + Debug 2.0 diff --git a/Solutions/Module5DeadlineChallengeSolution.py b/Solutions/Module5DeadlineChallengeSolution.py index 17634b6..e99f987 100644 --- a/Solutions/Module5DeadlineChallengeSolution.py +++ b/Solutions/Module5DeadlineChallengeSolution.py @@ -1,33 +1,31 @@ -#import the datetime class +# import the datetime class import datetime -#declare and initialize variables +# declare and initialize variables strDeadline = "" totalNbrDays = 0 nbrWeeks = 0 nbrDays = 0 -#Get Today's date +# Get Today's date currentDate = datetime.date.today() -#Ask the user for the date of their deadline +# Ask the user for the date of their deadline strDeadline = input("Please enter the date of your deadline (mm/dd/yyyy): ") -deadline = datetime.datetime.strptime(strDeadline,"%m/%d/%Y").date() +deadline = datetime.datetime.strptime(strDeadline, "%m/%d/%Y").date() -#Calculate number of days between the two dates -totalNbrDays = deadline - currentDate +# Calculate number of days between the two dates +totalNbrDays = int(deadline) - int(currentDate) -#For extra credit calculate results in weeks & days +# For extra credit calculate results in weeks & days nbrWeeks = totalNbrDays.days / 7 -#The modulo will return the remainder of the division -#which will tell us how many days are left -nbrDays = totalNbrDays.days%7 +# The modulo will return the remainder of the division +# which will tell us how many days are left +nbrDays = totalNbrDays.days % 7 -#display the result to the user - -print("You have %d weeks" %nbrWeeks + " and %d days " %nbrDays + "until your deadline.") - +# display the result to the user +print("You have %d weeks" % nbrWeeks + " and %d days " % nbrDays + "until your deadline.") diff --git a/Solutions/Module9EtchASketchChallengeSolution.py b/Solutions/Module9EtchASketchChallengeSolution.py index 7a37373..d41eb8a 100644 --- a/Solutions/Module9EtchASketchChallengeSolution.py +++ b/Solutions/Module9EtchASketchChallengeSolution.py @@ -1,29 +1,29 @@ -#Import the turtle drawing library +# Import the turtle drawing library import turtle -#Declare variables to hold the information the user enters and set the variables to initial values +# Declare variables to hold the information the user enters and set the variables to initial values penColor = 'black' lineLength = 0 angle = 0 -#Ask user for values for pen color, line length, and angle -#Don't forget to convert the numeric values to integers! -lineLength = int(input("How long would you like to make the line? (specify 0 to stop drawing) " )) +# Ask user for values for pen color, line length, and angle +# Don't forget to convert the numeric values to integers! +lineLength = int(input("How long would you like to make the line? (specify 0 to stop drawing) ")) penColor = input("What pen color would you like to use? (black, blue, red, green): ") angle = int(input("What angle would you like? (0-360): ")) -while lineLength != 0 : - #Draw a line using the values entered by the user +while lineLength != 0: + # Draw a line using the values entered by the user turtle.color(penColor) turtle.right(angle) turtle.forward(lineLength) - - #Don't forget to ask for new values inside the loop, otherwise lineLength will never change - #And your loop could execute forever, like mine did the first time I wrote this code! - #Luckily if yo udo accidentally code an infinite loop you can just click the Stop Debugging button in Visual Studio - lineLength = int(input("How long would you like to make the line? (specify 0 to stop drawing) " )) - #If they enter a length of zero then they want to stop drawing, so don't ask for the pen color and angle - if lineLength != 0 : + + # Don't forget to ask for new values inside the loop, otherwise lineLength will never change + # And your loop could execute forever, like mine did the first time I wrote this code! + # Luckily if yo udo accidentally code an infinite loop you can just click the Stop Debugging button in Visual Studio + lineLength = int(input("How long would you like to make the line? (specify 0 to stop drawing) ")) + # If they enter a length of zero then they want to stop drawing, so don't ask for the pen color and angle + if lineLength != 0: penColor = input("What pen color would you like to use? (black, blue, red, green): ") angle = int(input("What angle would you like? (0-360): ")) diff --git a/module4WorkingWithNumbers/module4WorkingWithNumbers.sln b/module4WorkingWithNumbers/module4WorkingWithNumbers.sln index 25731e8..72d7f32 100644 --- a/module4WorkingWithNumbers/module4WorkingWithNumbers.sln +++ b/module4WorkingWithNumbers/module4WorkingWithNumbers.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "module4WorkingWithNumbers", "module4WorkingWithNumbers\module4WorkingWithNumbers.pyproj", "{F5ACBB51-6603-49B5-9C79-6C85BC5C3B4E}" EndProject diff --git a/module4WorkingWithNumbers/module4WorkingWithNumbers/module4WorkingWithNumbers.pyproj b/module4WorkingWithNumbers/module4WorkingWithNumbers/module4WorkingWithNumbers.pyproj index c11d790..13065b7 100644 --- a/module4WorkingWithNumbers/module4WorkingWithNumbers/module4WorkingWithNumbers.pyproj +++ b/module4WorkingWithNumbers/module4WorkingWithNumbers/module4WorkingWithNumbers.pyproj @@ -1,5 +1,5 @@  - + Debug 2.0