Exercise 4 Create a variable called dates and set its value to accept output of

Exercise 4 create a variable called dates and set its

This preview shows page 1 - 4 out of 4 pages.

Exercise 4:Create a variable called $dates and set its value to accept output of the Get-Date cmdlet
Hint: Use Get-Help
Exercise 5:The variables $a = 5 and $b = 6 are contained in a script. How would you add these values together and display the total? (2 marks)
Exercise 6:Write a program which will take your age as input and convert your age to dog years (1 human year is equal to 7 dog years). Display the output message as “ Your age is ___ which is equivalent to ____ dog years”.Follow the 3 step process outlined in week 2 lecture.
Hint: Follow the process outlined in Lecture 3. Your program is 3 lines of code. Remember to use descriptive names such as $MyAge and $DogYearsExercise 7:Write a comment based help file for the program in Exercise 6. Use the headings SYNOPSIS,DESCRIPTION,NOTES and include your name and DateLastModifiedAnswer: (3 marks)<#.SYNOPSISCalculate User age to Dog years..DESCRIPTIONThe Script takes user input about his/her age and then calculate his/her age to dog years. Which was provides in a question that 1 human year is equal to 7 dog years . So it calculates the age and console a message with the dog years..NOTESAuthorName : Ammar Bin YasirDateLastModified : 09/17/2019#> Hint: Use the snippet in the ISE for a comment block and complete it as in lecture 3 exampleExercise 8:
Complete the table:DescriptionKeySelective ExecutionF8Set BreakpointF9Start SnippetsCtrl-JStart IntelliSenseCTRL+SPACEHint: review lecture 3 notes to find the keyboard shortcuts

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture