Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ตัวอย่างข้อสอบ Computer Programming ข้อที่ 1
- #Part 1
- num_int=int(input("Please insert number (1-9): "))
- while num_int==0 or num_int>9:
- print("Invalid value! Please try again!")
- num_int=int(input("Please insert number (1-9): "))
- real_num=float(input("Please insert number with decimal: "))
- word=input("Insert any string want: ")
- #Part 2
- num_order="1234567890"
- print(num_order*5)
- print('%-13s%22s%15s'%('INTEGER','FLOATING-POINT NUMBER','STRING'))
- print('%4d%31.5f%15s'%(num_int,real_num,word))
- '''
- #Notes
- print(len("FLOATING-POINT NUMBER"))----21
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement