Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1.13 KB

README.md

File metadata and controls

31 lines (25 loc) · 1.13 KB

Beginners-Problems-6

Subroutines-Beginners

Beginners Problems on Subroutines

Starter: Is it a Triangle? Write a procedure called triangleTest() that takes 3 parameters (3 sides of the triangle) and returns a boolean value telling the user whether it is a triangle or not. (Hint - it’s a triangle if the two smaller sides is greater (never equal or less than) the largest angle)

Greetings! Write 3 subroutines - one that says good morning, good afternoon and good evening (specifically to the user). Ask the user for their name and what time it is (for ease, we’re using 24 hour clocks) 0 to 12 - Good morning message 13 to 17 - Good afternoon message 18 to 23 - Good evening message

Example Output, Input is in blue: What’s your name: Julia What time is it: 17:59 Good afternoon, Julia!

Even Numbers: Create a program that tries to find even numbers in a given list of integers. It should have: A function called getEven A list of integers that you pass into getEven() A for loop inside your function to iterate through that list An if statement to check if the number is even A return statement that returns the even numbers