python day 03作业答案】的更多相关文章

1. (10) name='aleX leNb' print(name.split('l',1)) (13) name='aleX leNb' a=name.replace('a','A') print(a) (14) name='aleX leNb' count=0 for i in name: if i =='l': count+=1 print(count) (15) name='aleX leNb' count=0 for i in name[0:4]: if i =='l': coun…
Python面试真题答案或案例如下: 请等待. #coding=utf-8 #1.一行代码实现1--100之和 print(sum(range(1,101))) #2.如何在一个函数内部修改全局变量 a = 1 def funcs(): global a a = a +1 print(a) funcs() #3.列出5个python标准库 import datetime,os,sys,re,math #4.字典如何删除键和合并两个字典 student ={"age":18,"…
class Bank { //Dictionary<long,Account> dictionary=new Dictionary<long,Account>(); DataTable table = new DataTable();//存储,储蓄账户集合 DataTable table1 = new DataTable();//存储信用账户集合 SavingAccount account = new SavingAccount();//储蓄账户类的实例化 CreditAccoun…
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ATM.Day02 { class Bank { public int index; ]; public Account account = new Account(); public CreditAccount credit = new Cred…
class Card { private string name; public string Name { get { return name; } set { name = value; } } private string age; public string Age { get { return age; } set { age = value; } } private string sex; public string Sex { get { return sex; } set { s…
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace day1 { class PersonCard { private string name; public string Name //姓名 { get { return name; } set { name = value; } } privat…
.DataTable 实现 DataTable PersonCard = new DataTable(); //创建一个DataTable DataTable PersonCardCopy = new DataTable(); PersonCard.Columns.Add("姓名"); //添加列 名称 PersonCard.Columns.Add("年龄"); //添加列 年龄 PersonCard.Columns.Add("性别"); //添…
.Hashtable 实现 Hashtable table = new Hashtable(); while (true) { Console.WriteLine("------------------1.增加--------------------"); Console.WriteLine("------------------2.查询--------------------"); Console.WriteLine("-----------------…
.冒泡排序 Console.WriteLine("对集合里的数进行排序,请输入第一个数:"); int a = int.Parse(Console.ReadLine()); Console.WriteLine("对集合里的数进行排序,请输入第二个数:"); int b = int.Parse(Console.ReadLine()); Console.WriteLine("对集合里的数进行排序,请输入第三个数:"); int c = int.Par…
题一:九九乘法表的答案 //正三角 ; i < ; i++) { ; j <= i; j++) { Console.Write("{0}*{1}={2} ", j, i, i * j); } Console.WriteLine(); } Console.ReadLine(); //倒三角 ; i >= ; i--) { ; j--) { Console.Write("{0}*{1}={2} ", i, j, i * j); //不换行 } Cons…