UGHHHHHHHHH!!! This is so grueling especially since I'm in school rn, but I do have good news! My progress may be slow, but I've learned a good chunk of beginner coding, here --> Data Types
string phrase = "";
char grade = 'A';
int age = 10;
double gpa = 4.0;
bool isMale = true;
Console.WriteLine("Hello");
//float, double, decimal, left to right, least accurate to most accurate.
Console.ReadLine();
Methods:
Length → for showing the word count of a string or statement. ex/ string phrase = “Hello world!”
Console.WriteLine(phrase.Length)
//Our string “Hello World!” is represented by the variable phrase.
toUpper → For uppercasing an entire line of string.
Console.WriteLine(phrase.toUpper()); → there is an extra set of brackets inside the line to be able to run the code.
toLower → Same thing but opposite.
Contains → Tells me if the variable contains a certain set of characters or not,
Console.WriteLine(phrase.Contains(“World”)); Looks for the word in your string and gives you a true or false value based on whether or not it’s there.
ex/ If I had my string as (“Aliens Planet”) and my Contains Method was (“World”) it would show up as false on the terminal.
(again, this account is for documenting this journey, if you have any advice tell me in the comments!!!!)
Comments
Displaying 0 of 0 comments ( View all | Add Comment )