Posts

Showing posts from May, 2022

C++ IBM & EDX Lab: String Length and Pointers

  Yesterday's lab and lesson were on pointers in C++.  Below is an assignment from 1 of the labs.  My submitted code is below.  I will be posting the code to Github once the course was been archived. The assignment was about calculating a string length. However, we had to use a char pointer which made the task difficult.  I started to appreciate Python's string methods. Lab: String Length Write a program to calculate the length of the string using a pointer. Get the input string from the user and pass this string to the function.  Note: Please avoid the usage of exit(0) in your code.   Implement the following methods. 1. implement ‘stringLength’ Method signature, int stringLength(char* str) In this method, the input string given by the user is passed as a parameter. Find the length of the input string using a pointer and return it. The char pointer(char *) is passed as an argument to this method. 2. implement ‘main’ Method signature, int main() ...

C++ IBM -EDX Lab : Make a Number

Here is one of the lab exercises from the C++ class. The EDX course is run by IBM. I have included my code below the bottom. Lab: Make a Number Mark gets n numbers in an array. Write a program considering only the single digit even numbers in the array and make a number by combining those even numbers alone. If there are no single digit even numbers found in an array, then display the output message as  “Single digit even number is not found in the array” . If the array size is zero or lesser, then display the output message as  “Invalid array size”. Implement the following methods. Implement ‘main’ : In this method, get the input by the user and store it in an array. Check if the given number in an array is having a single digit even number. Implement the logic by considering only the single digit even numbers. For example: Consider an input value {2,7,41,4} stored in an array. In the given array, get the single digit even numbers which are 2 and 4. Implement a logic using th...

C++ : Continuing the journey

Next month, I will be taking a break from Python.  I usually take a break from Python every sixth month of the year. This year will be June and December.  During this time I will be continuing my learning of C and C++.  I have registered for a C++ class on EDX.  The class covers the fundamentals of C++, object-oriented design and programming in C++, and data structures and algorithms.   The course is run by IBM and I will be posting the lab examples and my code on this blog. I will still be working on the web development class that I started. It's just that I will be doing a lot of C++ instead of Python in June.

Day 7: Selectors and Combinators

Image
  Day 7 was about selectors and combinators. This included classes, id tags, header, and main selectors. I made several changes to the second page.

Day 6: More CSS styling

Image
I must admit that I have fallen behind in my web development class. I have been preoccupied with the cryptocurrency market and C & C++ programming.  However, I am happy to report that I am back into web dev. This weekend, we have been examining CSS styling and the CSS box model.  Below are pictures of the site and the changes that I made to the 2nd page. Second page with new CSS Styling Here is the first page. No changes were made.

Day 5: 100 days of Web Development

Image
  On Day 5, I worked on background color and adding a second page.  The background color was chosen by the instructor.  Of course, my interest in the course is based on Flask.  I hope to be able to integrate my HTML & CSS knowledge with Flask -and Django- in the future.

Day 4: 100 days of Web Development

Image
  I am interested in creating a website for my Crypto data. In order to achieve this goal, I have started learning Flask and Web Development.  I am currently taking the course "100 Days of Code - 2022 Web Development Bootcamp" on Udemy. It was recommended by several YouTube Software Engineers that I follow. So far, I have finished days 1-4. Below is the first page. I will post regular updates.