Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Basic layout incorporated
- Loading branch information
James Shuttleworth
committed
Nov 7, 2022
1 parent
c4d9e60
commit 429b49ee1dbeb61045346b5ae3b88339ad5da66e
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This is a comment. Any line beginning with a # is ignored by the interpreter | ||
|
||
# Write a program that displays "Hello World". | ||
|
||
# You onlyu need one line of code. | ||
|
||
# Hint: print("Goodby ldrow") is a valid line of python that you can start with... | ||
|
||
# Can you make it so this file is executable as "./hello_world.py"? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Here is an example of a function | ||
|
||
def say_hello(): | ||
print("Hello world") | ||
|
||
|
||
# it doesn't run without being called | ||
|
||
# uncomment the following to test it | ||
|
||
# say_hello() | ||
|
||
|
||
# Here is a funciton that calculates a square: | ||
|
||
|
||
def calcSquare(n): | ||
return 9 | ||
|
||
# Unfortunately it always returns the square of 3, not the given number | ||
# Correct it and uncomment the lines below to test it | ||
|
||
# n=5 | ||
# print(f"The square of {n} is {calcSquare(n)}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# WAD_python_intro | ||
Introductory exercises for python | ||
|
||
Introductory exercises for python. | ||
|
||
Clone the repository to your machine and try the exercises within. |