Code Errors Resolution

Valid JSON Array of Objects

Valid JSON Array of Objects [{“Name”:”Apple””Type”:”fruit””Price”:100},{“Name”:”Pizza””Type”:”Italian””Price”:370},{“Name”:”Burger””Type”:”Cheese””Price”:310},{“Name”:”Salad””Type”:”Veg””Price”:50}]  

Python Calculate Grade

Python if Loop Calculate Grade   #!/bin/python3import mathimport osimport randomimport reimport sysdefcalculateGrade(students_marks):average=0grade=’ ‘list=[]for i in range(len(student_marks)):sum=0list=student_marks[i]for i in range(len(student_marks)):sum=sum+list[i]average=sum/len(list):print(average)if(average<50):grade=’F’elif(average>=50)and (average<60):grade=’D’  

Python-Fibonacci-Sum

Python Fibonacci Series Sum #!/bin/python3import mathimport osimport randomimport reimport sys def sumOfFibonacciNumbers(n):sum=0;if n<2:return 0else:#print(“n is” +str(n))fibonacciSeries=[0,1]for i in range(2,n):nextElement=fibonacciSeries[i-1]+fibonacciSeries[i-2]fibonacciSeries.append(nextElement)for i in range(1,len(fibonacciSeries)):sum=sum+fibonacciSeries[i]return sumif _name_==’_main_’:fptr=open(os.environ[‘OUTPUT_PATH’],’w’)n=int(input().strip())result=sumOfFibonacciNumbers(n)fptr.write(str(result)+’n’)fptr.close()  

Angular Event Binding, To-do List

How to perform Angular Event Binding import {Component} from ‘@angular/core’; @Component({ selector: ‘app-root’, templateUrl: ‘./app.component.html’ }) export class AppComponent{ name: ‘Jsrd’; show:boolean; welcomeMe(username){ this.name=username; this.show=true; }} How to create a To-do List in Angular import {Component} from ‘@angular/core’; @Component({ selector: ‘app-root’, templateUrl: ‘./app.component.html’ styleUrls:[‘./app.component.css’] }) export class AppComponent{ todos:any done:boolean newToDo: String neToDoObj:any error:boolean TODOS: …

Angular Event Binding, To-do List Read More »