python and java Flashcards
bbl drizzzy bbl drizzy woahohoo bbl drizzy bbl drizzzzay
what does print(“content”) do and when do u use it
it make anything u make the content pop into the screen and u use it when u want text
how do u make a variable in python and when do u use it
u make a variable by doing x=content and u use it when u wana be lazy and not type the code and just type variable
if u put if 5<2: and type print(“5 is greater than 2”) will it show
no it will not show because its not true
how do u make a comment
u put # with anything and its a comment
what the script tag used for
In HTML, JavaScript code is inserted between
andtags.
where do u put functions and what it do
a JavaScript function is placed in the <body> section of an HTML page.
The function is invoked (called) when a button is clicked:
what does document.write()
Using document.write() after an HTML document is loaded, will delete all existing HTML:
why do we use window in javascript
You can skip the window keyword.
In JavaScript, the window object is the global scope object. This means that variables, properties, and methods by default belong to the window object. This also means that specifying the window keyword is optional:
how to make comments
do // dumbass hey thats not nice
i hope u choke on sand
do all number need to be with decimals
no you goffy ah hold the ice guava ice goffy ah looking monkey it can be written in anyway
are 2. Strings are text, written within double or single quotes:
yes lay low on the wiskey
how to make variable in java
var x =content; dumb ass
whats a freaking operater
a operater is something thats makes all the math stuff happen in java * is multiplscation / is divition and ** is power
whats arithmetic
same as a operater
whats a function
a sequence of commands that can be reused together later in a program.
what can u use const for
A new Array
A new Object
A new Function
A new RegExp
show me a example how to use it for array
const cars = [“Saab”, “Volvo”, “BMW”];
show me a example of using a const for a object
const car = {type:”Fiat”, model:”500”, color:”white”};
(u can still change the object )
whats a object
its just a variable with more values
how u use a object
u use it for using a variable for values
show me some code for object
// Create an Object:
const person = {firstName:”John”, lastName:”Doe”, age:50, eyeColor:”blue”};
// Display Data from the Object:
document.getElementById(“demo”).innerHTML =
person.firstName + “ is “ + person.age + “ years old.”;
</script>
if u want something to appear how do u use object for that
so use const then say the object name and when u want to use it type indexHTML=”tthevariablename.the name of object