Using Python to Solve Java Problems | Solving Chapter 1 Exercise 13

preview_player
Показать описание
Using Python to solve programming problems and exercises in DS Malik's book Java Programming - From Problem Analysis to Program Design.

In this video, I will tackle the first of the many programming exercises found in the book, particularly in Chapter 1 Exercise #13.

It's a simple programming exercise and takes only a few lines of codes in Python. The exercise requires to compute the weighted average of a student's scores from a series of data provided with the instructions. It also requires to design an algorithm. Although this exercise does not require to code and run using Python, I decided to do it anyways as an introduction to this video series.

The Problem
Design an algorithm to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format:

testScore1 weightTestScore1
...

For example, a sample data is as follows:

75 0.20
95 0.35
85 0.15
65 0.30

The Algorithm
1. Open file for reading
2. Get test score and weight from sample row of data
3. Multiply test score by weight and add the product to weighted average
4. If there is no more data do line 5 otherwise goto line 2
5. *Print the weighted average
6. Done

I hope you will learn from this video. If you have any suggestions, questions, or clarifications, please leave your comments below.

And don't forget to subscribe to get updated with the next videos in this series.

Music Credit: See You On The Otherside - The 126ers

#python​ #intermediate #programming #java #computerprogramming
Рекомендации по теме
Комментарии
Автор

Good sharing. I like it..Thank you very much.happy weekend 🥰💝

Автор

The video taught me many things. Editing was top tier too.

clarpy
Автор

Good video.





Hi teacher Clan.

orbitmingo
Автор

I learned so much by listening to your video

chawinintachai
Автор

Teacher your video is really easy to understand.

praweechaithararuenroeng
Автор

Maraming salamat po sa pagbisita nyo, kamusta na po kayo sir?

imarlie