Create a function that takes an argument . Give the function parameter a unique name . Show what happens when you try to use that parameter name outside the function. Explain the results.
Call your function with a local variable . Show what happens when you try to use that variable outside the function . Explain the results.
Create a python code that defines a function that takes an argument . Call the function. Identify what code is the argument and what code is the parameter .Call the function three times with different kinds of arguments : a value , a variable , and an expression . Identify which kind of argument is which .
Given a number N, write a program to print a triangular pattern of N lines with numbers as shown below.
N = 4
Using the operations of stack using linked list convert a decimal number to binary.
Prepare a c++ scores must input by the user to compute its total quiz.
Name Quiz1 Quiz2 Quiz3 Quiz4 Total Quiz
(20/20) (30/30) (15/15) (25/25) 90/90
Jessa Lee 12 15 15 20
Bino Ang
Cora Tan
Keni Lao
Cala Mansi
Dala Gan
Write a program which takes as input a huge array of numbers. This array is
split into n sub-arrays and n threads apply a bubble sort on each of the n sub-
arrays. Lastly, another thread merges the n sorted sub-arrays into one with
the same size as the original array. Of course, the resulting array should be
sorted.
Define a class named Person that contains the data fields for the first name and last name. Include only a non-default constructor that that initializes the data fields and a method that displays all the information about a Person. b) Define another class named Movie that stores a title, year of production and a director information. Director should be a Person member-object (i.e. use the Person class). Include a non-default constructor and a function to display Movie information. c) Write a program that creates two Movie objects, and displays information about the Movie objects. Save the file as Cinema.jav
Use methods and a loop of your choice to develop a program that can display multiples of 10 until 150 on a single line. For example, the output should be like: 10, 20, 30, 40,…….150.
The marks obtained by a student in different subjects are input by the user.The student gets as per the following rules;
>=70% grade A
Between 60 and 70% grade B
Between 50 and 60% grade C
Between 40 and 50% grade D
Below 40% grade E
Write a c++ program to compute and display the grade obtained by a student whenever the user enters the marks