联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2021-07-13 09:35

Programming guidelines

1.Use Any Python IDE you wish.


Requirements

1.Allow user to input an integer from 0 -> 2,000,000,000.

2.Validate the input.  If input is invalid, make them enter a value again.

3.Processing

4.Use the Division method for converting Decimal to Binary, and to Hex.

a.Divide the quotient by 2.

b.Get the remainder after dividing by 2.  Save the remainders.  They are the answer.

5.Loop and divide the test number by 2. Loop until the quotient is zero.

6.Note: Remember remainders are given in reverse order (LSB first).

7.Output

a.At beginning of the program, display some kind of welcome message, stating to the user what this program does.

b.When printing the results, display both the original integer value and the calculated binary and hex values. Display the output in a nice format.

8.Testing - Extensively test your program. Test with all type of integers values; valid and invalid data.


版权所有:编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。