A

@Aditya_Patra

Decision Making9(HOTS - A)

Lua
4 years ago
age = io.read("*n") if(age<5) then print("Fair Amount = ₹0") elseif(age>=5 and age<10) then print("Fair Amount = ₹500") elseif(age>=10) then print("Fair Amount = ₹600")

Decision Making8(HOTS - B)

Lua
4 years ago
p = io.read("*n") if(p>=90) then print("Your grade is 0") elseif(p<90 and p>=80) then print("Your grade is A") elseif(p<80 and p>=70) then print("Your grade is B")

Decision Making7

Lua
4 years ago
--[[Write a program to check the age of a person to display the fare amount as per the following conditions: Age>=60 == 4000 Age>=15 and < 60 == 5000--]] age = io.read("*n") if(age>=60) then print("You will have to pay Rs.4000") elseif(age>=15 a

Decision Making6

Lua
4 years ago
--Write a program to find wether a given year is a leap year or not. year = io.read("*n") if(year%400==0 or year%4==0 and year%100~=0) then print(year," is a leap year") else print(year," is not a leap year") end

Decision Making5

Lua
4 years ago
--Write a program to check wether a number is divisible by 5 and 11 or not. num = io.read("*n") if(num%5==0 and num%11==0) then print("The number is divisible by both 5 and 11") else print("The number is not divisible by both 5 and 11") end

Computer Practicals2

Lua
4 years ago
billAm = io.read("*n") if(billAm>=200 and billAm<=999) then discount = billAm/20 payAm = billAm-discount print('The amount you have to pay=',payAm) elseif(billAm>=1000 and billAm<=4999) then discount = billAm/10 payAm = billAm-di

Computer Practicals1

Lua
4 years ago
heightInFeet = io.read("*n") heightInCm = heightInFeet*30.48 print("Your height in feet =",heightInFeet,"\nYour height in cm =",heightInCm)

Finding half of a number

Lua
4 years ago
num1 = io.read("*n") num1 = num1/2 print(num1)

Finding if angles can form a triangle(MockTest2)

Lua
4 years ago
a1 = io.read("*n") a2 = io.read("*n") a3 = io.read("*n") if(a1+a2+a3==180) then print("The following angles can form a triangle.") else print("The following angles can't form a triangle.") end

Area Of Rectangle(MockTest)

Lua
4 years ago
l = io.read("*n") b = io.read("*n") area = l*b print('Length =',l,'\nBreadth =',b,'\nArea of the rectangle =',area)

Revision2

Lua
4 years ago
--Write a lua program to swap two variables(use a dummy variable) val1 = io.read("*n") val2 = io.read("*n") print("Value of val1=",val1,"Value of val2=",val2) dummy = val1 val1 = val2 val2 = dummy print("Value of val1=",val1,"Value of val2=",val2)

Revision1

Lua
4 years ago
--Write a lua program to find the area of triangle. b = io.read("*n") h = io.read("*n") area = 0.5*b*h print("The area of the triangle is", area)

Decision Making4

Lua
4 years ago
--[[Write a program to find the eligibility of admission for a proffessional course based on the following criteria: 1)Marks in maths >= 65 2)Marks in Physics >= 55 3)Marks in Chemistry >= 50--]] maths = io.read("*n") phy = io.read("*n") chem = io.r

Decision Making3

Lua
4 years ago
--[[Write a program to check whether a given number is even on odd.--]] num = io.read("*n") m = num%2 if(m==0) then print('The given number is even') else print('The given number is odd') end

Decision Making2

Lua
4 years ago
--[[Write a program to check whether a given number is positive or negative.--]] num = io.read("*n") if(num>0) then print('The given number is positive.') elseif(num<0) then print('The given number is negative.') else print('The given nu

Decision making1

Lua
4 years ago
--[[write a program to check the age of a person for casting vote.--]] age = io.read("*n") if(age >= 18) then print("You can cast vote.") else print("Looks like you have to wait for few years.") end

Converting units in lua2

Lua
4 years ago
--[[Write a program to store the kilograms in a variable and convert in to grams--]] kg = io.read('*n') g = kg*1000 print(kg, 'kilograms =', g, 'grams')

Converting units in lua

Lua
4 years ago
--[[Write a program to store the meters in a variable and convert in to kilometers--]] m = io.read('*n') km = m/1000 print(m, 'meters =', km, 'kilometers')

Finding speed of vehicle in lua

Lua
4 years ago
--[[Write a program to store the distance and time in two variables and display the speed--]] d = io.read('*n') t = io.read('*n') speed = d/t print('The speed covering',d,'kilometers in',t,'hours is',speed,'Kmph')

Finding force in lua

Lua
4 years ago
--[[Write the program to collect the values - mass of an object and acceleration in two variables and display the force--]] Mass = io.read('*n') Acc = io.read('*n') Force = Mass*Acc print('The mass is', Mass) print('The acceleration is', Acc) print(