Discuss / Python / 调用函数--作业

调用函数--作业

Topic source

LingByron

#1 Created at ... [Delete] [Delete and Lock User]
#!/usr/bin/env python3
#-*-coding:utf-8 -*-
n1 = int(input('please input num1:'))
n2 = int(input('please input num2:'))
print('hex.num1:',hex(n1))
print('hex.num2:',hex(n2))

python3 /home/linuxmint/文档/python_stu/homework.py

please input num1:255                                                              
please input num2:1000                                                             
hex.num1: 0xff                                                                     
hex.num2: 0x3e8

  • 1

Reply