Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PowerShell Script Programming Question Given the following two PowerShell string

ID: 3922794 • Letter: P

Question

PowerShell Script Programming Question Given the following two PowerShell strings...... [string] $animal1 = "Elephant" [string] $animal2 = "elephant" Using the above two strings, write powershell statements in the given box below, in the SAME ORDER AS QUESTIONS. Check for equality of the two strings regardless of the case. Check for equality of the two strings; case important Write a Single PowerShell line to make the word LENT (note all uppercase) using either $animal1 or $animal2 (Your answer must be in one line for full credit)

Explanation / Answer

Checking String equality regardless of the case:

>$animal1.ToLower() -eq $animal2.ToLower()

Checking string equality when case is important:

>$animal1 -eq $animal2

Make the word LENT from $animal1

>$animal1.ToUpper().Substring(1:3)+$animal1.ToUpper().Substring(6:8)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote