Skip to content
Snippets Groups Projects
Commit d514a39b authored by Colbry, Dirk's avatar Colbry, Dirk
Browse files

Merge branch 'JVBranch2' into 'main'

Adding Visual Studio to the repository

See merge request !14
parents e77378d3 bc2aa064
No related branches found
No related tags found
1 merge request!14Adding Visual Studio to the repository
%% Cell type:code id:fc73d74c tags:
``` python
##ANSWER##
#Install answercheck in current director
from urllib.request import urlretrieve
urlretrieve('https://raw.githubusercontent.com/colbrydi/jupytercheck/master/answercheck.py', filename='answercheck.py')
##ANSWER##
```
%% Output
('answercheck.py', <http.client.HTTPMessage at 0x7fc9a8612220>)
%% Cell type:markdown id:3c2a4f39 tags:
# Arrays
Learning how to use Arrays and how they work
%% Cell type:markdown id:2b78245b tags:
Arrrrays:
![ARRRR Pirate - Image found in Google Images](https://previews.123rf.com/images/greatnotions/greatnotions1509/greatnotions150904665/45057105-to-err-is-human-to-arr-is-pirate-get-this-pirate-design-from-great-notions-.jpg)
![Manta rays - Image found in Google Images](https://www.blueforcefleet.com/wp-content/uploads/Hot_Trips/Manta_expedition/maldives-diving-hanifaru-mantas-07-1024x683.jpg)
%% Cell type:markdown id:12d889db tags:
## Description
Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.
%% Cell type:markdown id:58ec20e8 tags:
## Self Assessment
Questions that test for the learning goals and allows students to evaluate if they truly understand the topics.
%% Cell type:markdown id:e4ef8001 tags:
&#9989; **<span style="color:red">Question:</span>** Write a C++ program to find the largest element of a given array of integers.
Original array: 5 4 9 12 8
Largest element of the said array: 12
Test Case 0:
int original[] = {5, 4, 9, 12, 8};
int expected = 12
%% Cell type:code id:7e1b6887 tags:
``` python
%%writefile array1.cpp
#include <iostream>
int main () {
std::cout << "Hello World" << std::endl;
return 0;
}
```
%% Output
Writing array1.cpp
%% Cell type:code id:977dc774 tags:
``` python
!g++ array1.cpp -o array1.exe
```
%% Cell type:code id:27c6eb99 tags:
``` python
!./array1.exe
```
%% Output
Hello World
%% Cell type:markdown id:64b34f55 tags:
&#9989; **<span style="color:red">Question:</span>** Write a C++ program to find the most occurring element in an array of integers.
Original array: 4 5 9 12 9 22 45 7
Most occurred number: 9
Test Case 0:
int original[] = {4, 5, 9, 12, 9, 22, 45, 7};
int expected = 9
%% Cell type:code id:b6d721b7 tags:
``` python
%%writefile array2.cpp
#include <iostream>
int main () {
std::cout << "Hello World" << std::endl;
return 0;
}
```
%% Cell type:code id:8a9fbda4 tags:
``` python
!g++ array2.cpp -o array2.exe
```
%% Cell type:code id:ad140d7e tags:
``` python
!./array2.exe
```
%% Cell type:markdown id:a52f65f3 tags:
&#9989; **<span style="color:red">Question:</span>** Write a function (named "templated_array_copy") that takes two parameters (two arrays of the same type). It copies the first array into the second. Note, it the arrays are different sizes, only copy what fits.
Test Case 0:
double source[] = {1, 2, 5, 6};
double dest[] = {9.4, 4, 5};
double expected[] = {1, 2, 5};
%% Cell type:code id:6a23d897 tags:
``` python
%%writefile array3.cpp
#include <iostream>
int main () {
std::cout << "Hello World" << std::endl;
return 0;
}
```
%% Cell type:code id:47a750c2 tags:
``` python
!g++ array3.cpp -o array3.exe
```
%% Cell type:code id:3eec186f tags:
``` python
!./array3.exe
```
%% Cell type:markdown id:5d237ca9 tags:
## Training Materials
%% Cell type:markdown id:21f9b14e tags:
Array material with some exercises (https://www.w3schools.com/cpp/cpp_arrays.asp)
Array material (https://www.programiz.com/cpp-programming/arrays)
Arrays in 7 minutes (https://youtu.be/3e1YNCQUJyo)
%% Cell type:code id:deeec8f7 tags:
``` python
from IPython.display import YouTubeVideo
YouTubeVideo("3e1YNCQUJyo",width="100%", height=360, cc_load_policy=True)
```
%% Output
<IPython.lib.display.YouTubeVideo at 0x7fcab1b48cd0>
%% Cell type:markdown id:44b461a0 tags:
---
Written by <<YOUR NAME HERE>>, Michigan State University
As part of the Data Science Bridge Project
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>.
%% Cell type:code id:fc73d74c tags:
``` python
##ANSWER##
#Install answercheck in current director
from urllib.request import urlretrieve
urlretrieve('https://raw.githubusercontent.com/colbrydi/jupytercheck/master/answercheck.py', filename='answercheck.py')
##ANSWER##
```
%% Output
('answercheck.py', <http.client.HTTPMessage at 0x7fc9a8612220>)
%% Cell type:markdown id:3c2a4f39 tags:
# R Studio/R
Getting the basics of RStudio/R
%% Cell type:markdown id:2b78245b tags:
R Studio:
![R Studio logo - Image found in Google Images from rstudio.com](https://www.rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png)
%% Cell type:markdown id:71e867d9 tags:
## Description
RStudio is an integrated development environment (IDE) for R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.
%% Cell type:markdown id:58ec20e8 tags:
## Self Assessment
Questions that test for the learning goals and allows students to evaluate if they truly understand the topics.
%% Cell type:markdown id:eab504b5 tags:
&#9989; **<span style="color:red">Question:</span>** Did you manage to download R Studio/R and run simple codes?
1. Yes
2. No
%% Cell type:markdown id:5d237ca9 tags:
## Training Materials
%% Cell type:markdown id:21f9b14e tags:
Tutorial on how to download and write simple code in R Studio - (https://www.stt.msu.edu/users/melfi/STT180Text/introduction-to-r-and-rstudio.html)
%% Cell type:markdown id:44b461a0 tags:
---
Written by <<YOUR NAME HERE>>, Michigan State University
As part of the Data Science Bridge Project
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>.
%% Cell type:code id:fc73d74c tags:
``` python
##ANSWER##
#Install answercheck in current director
from urllib.request import urlretrieve
urlretrieve('https://raw.githubusercontent.com/colbrydi/jupytercheck/master/answercheck.py', filename='answercheck.py')
##ANSWER##
```
%% Output
('answercheck.py', <http.client.HTTPMessage at 0x7fd12473a940>)
%% Cell type:markdown id:3c2a4f39 tags:
# Visual Studio
Understanding Visual Studio and how to properly use it
%% Cell type:markdown id:2b78245b tags:
![Visual Studio Logo - Image found in the public domain](https://cdn-icons-png.flaticon.com/512/906/906324.png)
%% Cell type:markdown id:71e867d9 tags:
## Description
Visual Studio empowers you to complete the entire development cycle in one place. For example, you can edit, debug, test, version control, and deploy to the cloud. With the diversity of features and languages in Visual Studio, you can grow from writing your first piece of code to developing in multiple project types. For example, you can build desktop and web apps with .NET, Mobile and gaming apps with C++.
%% Cell type:markdown id:58ec20e8 tags:
## Self Assessment
Questions that test for the learning goals and allows students to evaluate if they truly understand the topics.
%% Cell type:markdown id:b4d54efb tags:
&#9989; **<span style="color:red">Question:</span>** Did you manage to download Visial Studio and run "Hello World":
1. Yes
2. No
%% Cell type:markdown id:5d237ca9 tags:
## Training Materials
%% Cell type:markdown id:21f9b14e tags:
https://code.visualstudio.com/docs/introvideos/basics - Getting started with Visual Studio Code with Video Tutorial
https://visualstudio.microsoft.com/vs/getting-started/ - Learn to code in Visual Studio with Video Tutorials
%% Cell type:markdown id:44b461a0 tags:
---
Written by <<YOUR NAME HERE>>, Michigan State University
As part of the Data Science Bridge Project
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment