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
13 changes: 13 additions & 0 deletions 01-read_input_anaya_yorke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# read the name of the user and print hello

echo "Hello from anaya yorke! What is your name"
read name
echo "Welcome, $name"
echo "How old are you?"
read age
echo 'Thanks anaya! I see you are ' $age ' years old'

echo "What school do you currently attend?"
read school
echo 'Nice! ' $school ' sounds like a great place to learn.'
17 changes: 17 additions & 0 deletions 02-add_nums.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,20 @@ read height
echo ""
pixelTotal=$(( $width * $height ))
echo "Your display has ${pixelTotal} pixels."

# Let's calculate area of a rectangle
echo "Enter length of rectangle:"
read length
echo "Enter width of rectangle:"
read rectWidth

area=$(( length * rectWidth ))
echo "The area of your rectangle is $area"

# Let's also calculate area of a circle
echo "Enter radius of circle:"
read radius

# Using simple approximation: area = 3 * radius * radius
circleArea=$(( 3 * radius * radius ))
echo "The area of your circle is approximately $circleArea"
Binary file added aftermerge_anaya.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gitbranchparallel_anaya.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.