{"size": 1103, "ext": "js", "max_stars_repo_path": "webapp/apps/Base Quiz/baseui.js", "max_stars_repo_name": "sk-Prime/webapp", "max_stars_repo_stars_event_min_datetime": "2021-12-11T16:01:10.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-22T19:47:51.000Z", "max_issues_repo_path": "webapp/apps/Base Quiz/baseui.js", "max_issues_repo_name": "sk-Prime/webapp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webapp/apps/Base Quiz/baseui.js", "max_forks_repo_name": "sk-Prime/webapp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.4242424242, "max_line_length": 68, "alphanum_fraction": 0.5874886673}
var number = 0;
var ques=0
var ans1 = 0;
var ans2 = 0;
function space(value){
    return value.slice(0,4) +" "+value.slice(4)
}
function randomize(){
    document.getElementById("label_t").innerHTML="?";
    document.getElementById("label_b").innerHTML="?";

    number = Math.floor(Math.random() * 256);
    var mode = Math.floor(Math.random() * 3);
    if (mode == 0){
        ques = "dec : " + number;
        ans1 = "hex : " +number.toString(16).toUpperCase();
        ans2 = "bin : " +space(number.toString(2).padStart(8,'0'));
    }else if (mode==1) {
        ans1 = "dec : " + number;
        ques = "hex : " + number.toString(16).toUpperCase();
        ans2 = "bin : " + space(number.toString(2).padStart(8,'0'));
    }else if (mode==2) {
        ans2 = "dec : " + number;
        ans1 = "hex : " + number.toString(16).toUpperCase();
        ques = "bin : " + space(number.toString(2).padStart(8,'0'));
    }
    document.getElementById("label").innerHTML=ques;
}

function answer(){
    document.getElementById("label_t").innerHTML=ans1;
    document.getElementById("label_b").innerHTML=ans2;
}