一.方法中的参数为数值型的(int) import java.util.Scanner; public class ScoreCalc { public void calc(int num1,int num2,int num3){ int sum = num1 + num2 +num3; double avg = sum / 3; System.out.println("总成绩:"+sum); System.out.println("平均分:"+avg); } pu
在返回json对象的几种方式: 1 from django.shortcuts import render, HttpResponse # Create your views here. from django.views import View from app01 import models import json class BookListView(View): """使用json进行json序列化""" def get(self, re