Digital FXtbook
Easy Contacts
  • Home
    • Software
    • The Author
    • Former Students Hall of Fame
    • A tribute....
    • Treasure Hunt
  • Video Game Training
    • 3d Motion Graphics >
      • Unity >
        • Unity Essentials >
          • Unity's Interface >
            • Our First Assignment
          • Modeling and Level Design >
            • The Essentials
            • The Floor is Lava Name Project
            • ProBuilder >
              • ProBuilder Image Planes
              • ProBuilder Steve Modeling
              • ProBuilder Steve Texturing
          • Programming >
            • Getting Started with Scripting
            • Default Scripting
            • Scripting a Game Object
          • Real Time Audio >
            • Adding Background Music
            • 3-d Audio effects
          • 2d Essentials >
            • 2d Game Objects
            • Objects on 2d Game Objects
        • Creative Core >
          • Introduction to Creative Core
          • Shaders and Materials
          • Lighting
          • Animation
          • VFX
          • Cameras
          • Post Processing
          • Audio
          • User Interface
          • Proto-Typing
    • C# Programming >
      • Visual Studios >
        • First Program >
          • Getting input from the User
        • Comments >
          • PsuedoCode
        • Variable Types >
          • AlphaNumeric Variables
          • Numeric Variables
          • Putting it all together
        • Operators >
          • Assignment and Arithmetic Operators >
            • Use of Parenthesis
            • When is Easter??
          • Comparison and Logical Operators >
            • Logical Data, Illogical Assignment
          • Random Class
        • Conditional Statements >
          • Number validator
          • Number tester
          • Speed Camera
        • Loops >
          • For Loops >
            • Adding Numbers
          • For Each Loops
        • Arrays >
          • Simple Arrays
          • Complex Arrays
      • Intro to Unity >
        • Unity Essentials >
          • Unity's Interface
          • The Essentials
          • Programming >
            • Getting Started with Scripting
            • Default Scripting
            • Scripting a Game Object
        • Intro to Programming 1 >
          • Player Control 1 >
            • Player Control 1.2
            • Player Control 1.3
            • Player Control 1.4
          • Player Control 2 >
            • Player Control 2.2
            • Player Control 2.3
            • Player Control 2.4
          • Player Control Challenge
        • Intro to Programming 2 >
          • Sound and Effects >
            • Sound and Effects 3.2
            • Sound and Effects 3.3
            • Sound and Effects 3.4
          • GamePlay
          • User Interface
          • Feedback and Testing
          • Next Steps
        • Intro to Programming 3 >
          • Manage Scene Flow and Data
          • Apply Object-Oriented Principles
    • Modeling and Rigging >
      • Modeling >
        • Introduction: The Temple
        • Name Text Curve
        • Character Modeling >
          • Minecraft Steve
          • Minecraft Steve UV
          • Roblox Character modeling
          • Big Daddy
          • Demon School Iruma-kun
          • Character Modeling Legion the Geth
          • Character Modeling Geth Armor
        • Weapons >
          • Minecraft Tools and Weapons
          • Minecraft Movie Pickaxe
          • Minecraft Movie Sword
          • Thor's Hammer
          • Hammer
          • LOL Sword
          • Sword of Light
          • Buzz Axe
          • Weapon
      • Rigging >
        • Intro to Rigging
        • Controls
        • Rigging Basics
        • Rigging Creating Skeletons
        • Rigging: Body Controls
        • Rigging: Hands
        • Rigging: Skinning
        • Smooth Skinning
    • Advanced >
      • Modeling >
        • Image Planes
        • Polygon Modeling >
          • Coke Can
          • Low Polygon Character
          • Character Modeling Legion the Geth
          • Character Modeling Geth Armor
          • Face Modeling
        • NURBS Modeling >
          • Intro to NURBS
          • Lofting
          • CV Curves
          • Organic Modeling
          • Autombile
      • Linda Training >
        • Advanced Modeling >
          • Modeling Basics
          • Modeling Room Objects
      • Texturing
      • Rigging >
        • Rigging with HumanIK
        • Smooth Skinning
  • Student Films
    • Advanced Student's movies
    • Beginning Student's movies
  • Links
    • BPA
    • The Top Six Animation Schools
    • The Top Video Game Design Schools

Logical Data
with an Illogical Assignment 

In this lesson you are going to have the opportunity to interact with operators and Logical Data. Somtimes in code the things that you need to test for can be very specific and strange if you don't know the circumstances of why you are trying to get them. This is exactly the case in the assignment. You are being asked to utilize operators to test for specific values.
Good luck and enjoy... Believe it or not this is really not all that hard.


The Code

using System;

namespace Parenthesis
{
    class Program
    {
        static void Main()
        {
            {
                bool answer;
                Console.Write("Please enter a number ");
                string strValue = Console.ReadLine();
                int value = Convert.ToInt32(strValue);

                // write your code here

                Console.WriteLine("The number you put in " + strValue + " is " + answer);
            }
             
        }
    }
}​



​Example Videos

The conditions

Take a look at the code below: it reads an integer value, and is then ready to perform a complicated test and print the answer – it may be True or it be False.


We need a number whose value:
1. is greater than or equal to 0 and less than 10, or
2. multiplied by 2 is less than 20 and subtracted by 2 is greater than minus 2, or
3. reduced by 1 is greater than 1 and divided by 2 is less than 10, or
4. is equal to 111.


​Write the above condition in the form of an expression accepted by the C# language and assign its result to the answer variable. Test your code using the data we've provided. 





​Helpful hints:

Greater than looks like this >
​Less than looks like this <
Greater than or equal to looks like this >=
Less than or equal to looks like this <=

Reduced/Subtract looks like this -
Increased/Added looks like this +

Multiplied looks like this *
Divide by looks like this /

Testing to see if something is Equal to something else looks like this ==
Testing to see if something is Not Equal to something else looks like this !=

Or looks like this ^ (it is a Shift 6)
And looks like this && (it is a double Shift 7)

The Results

Example input
-2
​
Example output
THAT'S NOT TRUE 


Example input
0
 
Example output
THAT'S TRUE 


Example input
4

Example output

THAT'S TRUE 


Example input
10

Example output THAT'S TRUE 


Example input
22

Example output
THAT'S NOT TRUE 


Example input
100

Example output
THAT'S NOT TRUE 


Example input
111

Example output
THAT'S TRUE 
Proudly powered by Weebly