Our project- HANGMAN.

--Originally published at Alexa

I made this project with the help of Lourdes Manzanilla. It’s a pretty hangman game that gives you 7 tries and asks you to choose between 3 cathegories. The most difficult part was turning the hyphens into letters in case they were right. The funniest part was making the hangman. Thanks to this project we learnt a lot of new things and we challenged ourselves.

ASCII art: https://www.ascii-code.com/ascii-art/animals/

https://www.ascii-code.com/ascii-art/food-and-drinks/

http://www.chris.com/ascii/index.php?art=food%20and%20drink/apples

http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20

Youtube (some videos that helped): https://youtu.be/QSfqsJYA6a8

Thanks to Teacher Ken for this course and to all my classmates.

Here is the code:     hangman

Here is the output: project


WSQ 12- Estimating e.

--Originally published at Alexa

doggyywsq12

My code:

#include <iostream>
using namespace std;

 

int factorial (int x){
if (x==0)
return 1;
else
return x*factorial(x-1);
}

double calculate_e (double decimal){
double e=0;
int i=0;
double before;
do {
before=e;
e=e+1.0/factorial(i);
i++;
} while (e-before>decimal);
return e;
}

 

int main (){
double decimal;
cout<<“Give me the precision you want your ‘e’ to have”<<endl;
cin>>decimal;
cout<<“The value of your ‘e’ is: “<<calculate_e(decimal)<<endl;

return 0;
}

In this program you ask the user for the precision and it calculates the constant ‘e’. It was a little hard cause I had the idea but I didn’t know how to put it into a program. Teacher Ken helped me a little in this one.


WSQ 11- Go bananas.

--Originally published at Alexa

wsq11

Here is my code: doggy

#include <algorithm>

#include <iostream>

#include <fstream>

#include <string>

using namespace std;

 

int count (string ban){

int bananaCount;

ifstream infile;

int pos;

infile.open(“banana.txt”);

bananaCount=0;

string line;

 

if (infile.is_open())

{

while(getline(infile,line)){

transform(line.begin(), line.end(), line.begin(), ::tolower);

pos = line.find(ban);

while(pos != -1){

cout << “OMG I found a banana at position: ” << pos << endl;

bananaCount++;

pos = line.find(ban,pos+1);

}

}

}

return bananaCount;

infile.close( );

int main(){

string ban=”banana”;

cout<<“Number of bananas: “<<count(ban) <<endl;
return 0;

}

This program was pretty easy cause I already had a program to open files. All I had to do was counting the number of bananas inside a file. The new part about this was that I used a new kind of function inside the algorithm library, it was “transform”. Here I used a lot of mastery topics. http://www.cplusplus.com/reference/algorithm/transform/


WSQ 07- Lists.

--Originally published at Alexa

#include <iostream>
#include <cmath>wsq7
using namespace std;

int main ()
{
float tot, avr, sta;
float numbers [10];
tot =0;
sta =0;

for (int i=0; i<10; i++)
{
cout<<“Please give me the value of a number: “<<endl;
cin>>numbers [i];
tot = tot + numbers[i];Resultado de imagen para cute doggo}

avr=tot/10.0;

for (int i=0; i<10; i++)
{
sta = sta + (numbers [i]-avr)*(numbers [i]-avr);
}

sta = sqrt (sta)/10.0;

cout<<“\nThe total is: “<<tot <<endl;
cout<<“The average is: “<<avr <<endl;
cout<<“The standard deviation is: “<<sta <<endl;

return 0;
}

#masterytopic14 #masterytopic18. In this program I made use of arrays and “for” loops. This program asks the user for 10 numbers and then calculates the sum, average and standard deviation. I had already done my program and it worked only that I didn’t do it how it was supposed to be. Teacher Ken helped me with this one. Thanks Ken.


Feedback of this first partial

--Originally published at Alexa

IT WAS HARD, not because of the programation but because adapting to a new environment without my family was difficult and kinda sad. I still miss them tho. My grades weren’t as good as expected, i’m poorer everyday, i’m always hungry and ain’t nobody got time to sleep. I think this gets easier, but we’ll see. I ❤ Ru Paul’s everyone should see Season 6. #RPDGseason6 #party #laganjaestranja #thelibraryisopen

Resultado de imagen para dog with makeup

this doggo is giving some 80’s diva glamazon realness. The couture is amazing. Shantay she stays.