1/12
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No study sessions yet.
Console.WriteLine()
Prints text or numbers to the screen. Example: Console.WriteLine("Hello"); prints Hello
Console.ReadLine()
Reads input from the user. Example: string name = Console.ReadLine(); stores user input in name
Math.Abs()
Returns the absolute value of a number. Example: int x = Math.Abs(-5); x is 5
Math.Pow()
Raises a number to a power. Example: double y = Math.Pow(2, 3); y is 8
Math.Sqrt()
Returns the square root of a number. Example: double y = Math.Sqrt(9); y is 3
string.Length
Returns the number of characters in a string. Example: int len = "Hello".Length; len is 5
string.ToUpper()
Converts text to uppercase. Example: string up = "hi".ToUpper(); up is "HI"
string.ToLower()
Converts text to lowercase. Example: string low = "HI".ToLower(); low is "hi"
string.Contains()
Checks if text contains a substring. Example: bool has = "Hello".Contains("H"); has is true
List.Add()
Adds an item to a list. Example: List
List.Remove()
Removes an item from a list. Example: nums.Remove(5); nums no longer contains 5
List.Count
Returns the number of items in a list. Example: int c = nums.Count; c is 0