Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

Can you please share the level number?
one year ago
Try this:
***
package main
import "fmt"

func main() {
var length float64 = 3.5
var width int = 4
var area int
area = int(length)*width
fmt.Println("Area is:", area)
}
***
Sorry for the delay.
one year ago
Here is the correct code:
***
let txt1 = 'Yokozuna';
let txt2 = 'Yokohama';

if(txt1.length == txt2.length) {
console.log("Both are same");
}
***
one year ago
Your answer is correct, its just that our system is a little strict. This should work:
***
let x = true;
let y = false;

// apply AND operator
console.log(x && !y)

// apply OR operator
console.log(!x || y)
***
one year ago
Can you share the level number and lesson number so that I can help you.
one year ago
This should work:
***
let x = 0;

while(x < 10)
{
console.log(x);
if(x == 5) {
break;
}
x++;
}
***
one year ago
Here is the correct code:
***
package main

import "log"

func main() {
if true {
log.Println("Going great...")
} else {
log.Fatal("Oops failed!")
}
}
***
one year ago
Don't add the alert.

Correct code:
***
window.onload = function () {}
***
one year ago
Hi, we are facing some issues with Internet access in the compiler environment and hence this issue. We are working on fixing this.
one year ago
Try this code:
***
package main
import "fmt"

func main() {
var listOfTwenty [20] int
for i := 0; i < 20; i++ {
listOfTwenty[i] = i+1
}
fmt.Println("Here is the list of 20 numbers:")
for j := 0; j < 20; j++ {
fmt.Println(listOfTwenty[j])
}
}
***
one year ago
Please share level number and lesson number.
one year ago
Here is the correct answer:
***
function scanAndPay(item, amount)
{
console.log("Welcome to scan and pay service");
console.log(`Payment of ${amount} done for purchasing ${item}.`);
}

function orderFood(item)
{
switch(item)
{
case "Burger":
scanAndPay(item, 50);
break;
case "Cold Drink":
scanAndPay(item, 30);
break;
case "Pizza":
scanAndPay(item, 100);
break;
}
}

orderFood("Pizza");
***
one year ago