Skip to content
Permalink
Browse files
Basic layout incorporated
  • Loading branch information
James Shuttleworth committed Nov 7, 2022
1 parent c4d9e60 commit 429b49ee1dbeb61045346b5ae3b88339ad5da66e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
@@ -0,0 +1 @@
*~
@@ -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"?
@@ -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)}")
@@ -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.

0 comments on commit 429b49e

Please sign in to comment.