Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions 02-add_nums.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,21 @@ sum=$(( first+second+third ))

echo "The sum is $sum"

echo "Enter width"
read width
echo "Enter height"
read height
pixel=$(( width*height))

echo "You have $pixel pixels"

echo "Type the width RIGHT NOW"
read width
echo "Type the height RIGHT NOW"
read height
pixels=$(( width*height ))
echo "Total pixels: $pixels"

# exercise: ask the user for the width and height and present total
# number of pixels

Binary file added Screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions joshua.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# read the name of the user and print hello

echo "Hello! What is your name"
read name
echo "Welcome, $name. My name is Joshua Wilson"

# single quotes prevent the expansion of the variable
echo 'Your name was stored in $name'

# exercise: write a script that asks the user for a
# filename and create an empty file named after it
Binary file added my branches Joshua Wilson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.