Posts

UCEST 105 Lab Cycle - 3

Learning Objective:      Learn to use RATOR tool      Learn to use nested control statements RAPTOR programs to try 1.Check positive and negative number 2.Odd or Even Number using modulus (%) operator 3.Print 10, 9, 8, .... 1 4.Print sum of the digits of a number 5.Factorial of a given number Nesting of Loops/control statements Print the following patterns using nested loops. 1.Square Pattern: * * * * * * * * * * * * * * * * * * * * 2.Right-Angled Triangle Pattern: * * * * * * * * * * * * * * * 3.Pyramid Pattern:                   *              * * *           * * * * *       * * * * * * *    * * * * * * * * * 4.Number pattern ( read N; example with N=5 is shown) 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1   5.Write a python program to generate the following type of pattern for the given N rows where N <= 26.(University Question) A A B A B C A B C D A B C D E 6.Pascals Triangle n=0                     1 n=1                  1      1 n=2               1    2    1 n=3. 

Sample Class Room Exercises

Image
Sample Classroom Exercises:  1. Identify three ill-defined problems and well-defined problems 2. Identify five use cases for Trial and error, Heuristics, backtracking, and Means-ends analysis. 3. Use a diagram to solve the Tower of Hanoi for three pegs with the minimum number of moves. 4. Evaluate different algorithms discussed earlier based on their efficiency by counting the number of steps. 5. A recursive function that takes a number and returns the sum of all the numbers from zero to that number. 6. A recursive function that takes a number as an input and returns the factorial of that number. 7. A recursive function that takes a number ‘n’ and returns the nth Fibonacci number. 8. A recursive function that takes an array of numbers as input and returns the product of all the numbers in the array. 9. A program to reverse the contents of an 1D array without using a second array. 10. To register for the end-semester examination, you need to log into the University portal with your cred

About NASSCOM Digital 101 Course KTU 2024 Scheme

Image
NASSCOM Digital 101 Course Skill Enhancement Course: Digital 101 is an introductory Massive Open Online Course (MOOC) offered by NASSCOM. It is designed to provide students with foundational knowledge and skills in digital technologies, preparing them for further studies and careers in the digital domain. By incorporating the Digital 101 course into the curriculum, KTU ensures that all students gain valuable digital skills early in their academic journey, enhancing their readiness for advanced courses and future careers in technology. Course Registration and Completion: ● Students have the flexibility to register and complete the Digital 101 course either in their first semester (S1) or second semester (S2). ● The credit for this course (1 credit) will be officially recorded in the second semester grade card. Signup for the course in Futureskills website Search for Digital 101 Course 30 Hours Learn  the 10 modules There are 54 chapters in this 10 module- You have to earn 54 badges afte

Problem-Solving Strategies

Definition of Problem-Solving Strategies: Problem-solving strategies are systematic methods or approaches used to find solutions to challenges, issues, or complex situations. These strategies guide the process of identifying the problem, exploring possible solutions, and implementing the best course of action. Description of Problem-Solving Strategies: Problem-solving strategies are essential tools that help individuals and groups approach challenges in an organized and effective manner. Different strategies are used depending on the nature of the problem, the available information, and the desired outcome. Here are some common problem-solving strategies: Trial and Error : Description : This strategy involves trying different solutions and learning from mistakes until the correct one is found. It's practical when you have no clear path to the solution and need to explore various options. Heuristics : Description : Heuristics are mental shortcuts or "rules of thumb" that

Backtracking

The Backtracking method is a problem-solving strategy that involves exploring possible solutions to a problem by building them incrementally, step by step. If you reach a point where the current path doesn't lead to a solution, you backtrack—go back to the previous step—and try a different path. It’s particularly useful for solving problems with multiple possible solutions or where the solution involves making a sequence of decisions. What is the Backtracking Method? Definition : Backtracking is a method where you try to solve a problem by exploring all possible options. If you find that a certain option doesn’t lead to a valid solution, you undo (or "backtrack") that choice and try the next option. Purpose : The goal is to find the correct solution by systematically exploring all possibilities, while discarding paths that don’t work. Steps in the Backtracking Method: Identify the Problem and Constraints : Clearly understand the problem and any constraints (rules or limi

Heuristic Method

The Heuristic Method is a problem-solving strategy that uses practical shortcuts or "rules of thumb" to make decisions and find solutions more quickly and efficiently, even if the solution isn’t perfect. Here’s how it works: What is the Heuristic Method? Definition : A heuristic is a mental shortcut that allows people to solve problems and make judgments quickly and efficiently. It’s a way to simplify complex problems by focusing on the most important factors or by applying general principles that usually lead to a good enough solution. Purpose : Heuristics are used when you need a fast, efficient solution and are willing to accept that it may not be the absolute best or most accurate one. Characteristics of Heuristics: Simplification : Heuristics simplify complex problems, making them easier to tackle. Speed : They provide quicker solutions by cutting down on the time and effort needed. Satisfactory Results : Heuristics aim for a "good enough" solution rather than

Lab Experiments and Solutions - Algorithmic thinking with Python KTU S1 2024 scheme

 LAB Experiments:  1. Simple desktop calculator using Python. Only the five basic arithmetic operators. 2. Create, concatenate, and print a string and access a sub-string from a given string. 3. Familiarize time and date in various formats (Eg. “Thu Jul 11 10:26:23 IST 2024”). 4. Write a program to create, append, and remove elements in  lists.( using Numpy array also) 5. Program to find the largest of three numbers. 6. Convert temperature values back and forth between Celsius (c), and Fahrenheit (f). [Formula: °C = (°F - 32) × 5/9] 7. Program to construct patterns of stars (*), using a nested for loop. 8. A program that prints prime numbers less than N. 9. Program to find the factorial of a number using Recursion. 10. Recursive function to add two positive numbers. 11. Recursive function to multiply two positive numbers. 12. Recursive function to find the greatest common divisor of two positive numbers. 13. A program that accepts the lengths of three sides of a triangle as inputs. The