#include <stdio.h> #include <string.h> // To return value for a character. 10 is returned for 'A' int val(char c) { Continue reading
Python Task on PandasProblems
{ "cells": [ { "cell_type": "code", "execution_count": 195, "metadata": {}, "outputs": [ { Continue reading
R Programming Task on Naive Bayes Classifier
#data
Universal_bank = read.csv(“UniversalBank.csv”, header = T)
dim(Universal_bank)
head(Universal_bank) Continue reading
Python Task on Island of Rats and Cats
from numpy import random
def get_rain():
if random.rand() < rain_chance:
return 0
return max(0, random.normal(rain_mean, rain_std, size=(1, 1))[0][0]) Continue reading
Python Task on War and Peace by Leo Tolstoy
#!/bin/python3
“””
Explain how your pseudo random numbers are produced.
– The pseudo random numbers without seed value. Will be take the nanosecond on posis system. Then move to text file base on position. So it will work.
– The pseudo rando number with seed value. Will be move to file with this position. That’s mean the random will be the same
“”” Continue reading
Python Task on Run-Length Encoding & Decoding
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
/* Stores parameters that specify how to the program should behave. * Continue reading
Python Program on Guessing Game
import numpy as np print('') print("Enter two numbers, low then high.") l = int(input("low = ")) h = int(input("high = ")) Continue reading
R Programming Task on Matrix
summary_statistics_A <- function(matrix){
vec = sort(as.vector(matrix))
len = length(vec)
if(isSymmetric(matrix) && is.numeric(matrix)){
min = vec[1]
Continue reading
Matlab Task Temperature
Report on Behavioral Learning Theory And Its Theorists
Introduction
Behaviorism is a learning theory which considers that all behaviors are learnt as a result of some external stimulus. According to this theory, a learner always responds to this external stimulus which is either in the form of reinforcement or punishment (Staddon, 2017). Both positive and Continue reading
Python Task on Pence Piece Shapes using Tegan the Turtle
from turtle import *
import random
if __name__ == ‘__main__’:
number_coins = int(input(‘Enter a number of coins: ‘)) Continue reading
Engineering Programming Task on EIT moodle
Q 1 – ANSWER :
int first, last;
first=1;
last=10;
for (i=first; i<last; i++)
{
} Continue reading
R Task on ANOVA Model
rm(list = ls())
options(warn = -1)
library(readxl)
## Reading the data from excel
Project_2_Data <- read_excel(“Stat 481 Project 2 Data.xls”)
str(Project_2_Data)
## Cleaning and attributing the dtaa
Project_2_Data$courses = as.factor(Project_2_Data$courses)
Project_2_Data$gender = as.factor(Project_2_Data$gender)
levels(Project_2_Data$gender) <- c(“Female”, “Male”)
levels(Project_2_Data$courses) <- c(“Algebra”, “Algebra&Geometry”, “Calculus”)
attach(Project_2_Data)
## Descriptives
library(ggplot2)
library(hrbrthemes)
library(dplyr)
library(tidyr)
library(viridis)
temp = aggregate(score~courses+gender, Project_2_Data, FUN = mean)
qqnorm(score)
ggplot(Project_2_Data, aes(x = score)) + geom_histogram()
summary(Project_2_Data)
p1 <- ggplot(data=Project_2_Data, aes(x=score, fill=courses)) + geom_density(adjust=1.5, alpha=.4) + theme_ipsum()
p2 <- ggplot(data=Project_2_Data, aes(x=score, fill=gender)) + geom_density(adjust=1.5, alpha=.4) + theme_ipsum()
## Model
## Test of normality and other assumptions
ks.test(score, pnorm, mean = mean(score), sd= sd(score))
bartlett.test(score~courses, data = Project_2_Data)
bartlett.test(score~gender, data = Project_2_Data)
## Linear model
model1 = anova(score ~ courses + gender, data = Project_2_Data)
model1
summary(model1)
## Post Hoc
library(DescTools)
PostHocTest(model1, method = “bonferroni”)
PostHocTest(model1, method = “hsd”)
C++ Programming Task – Pointers/Arrays
#include <iostream>
#include <string>
using namespace std;
int main()
{
int numItem; Continue reading
Management Task on Online Learning Self-efficacy and Learning Satisfaction
Introduction
The article " Unpacking online learning understandings: Online learning self-efficacy and learning satisfaction" issued by four authors: Demei Shen, Moon-Heum Cho, Chia-Lin Tsai and Rose Marra was first accepted by Elsevier Inc for Released on April 8, 2013, and made available on April 15, 2013, for on-line access. Continue reading