Write A Python Script To Input A Number And Print Its First Five Multiples
Hi Programmers, welcome to my blog, lets try to get python solution for write a python script to input a number and print its first five multiples.
Title :
Python Problem : Write A Python Script To Input A Number And Print Its First Five MultiplesDescription :
Ask user to enter a number, convert it from string to int. Take a for loop from range 1 to 6 and multiple index with number and keep printing. It will print as shown in output., nan
Code :
number = int(input("Enter a number: ")) print("First five multiples are : ") for index in range(1,6): print(number * index) """ output : ================= Enter a number: 12 First five multiples are : 12 24 36 48 60 """
Conclusion :
Once you are done with reading the above code, open your python editor, try to write the program by yourself. This will improve your coding skills, try changing variable names, change operators and execute it.
Thank you for reading my article about write a python script to input a number and print its first five multiples if you have any queries about above solution, please comment down below, if you like this article share it with your friends.
My YouTube Channel (Subscribe)
https://www.youtube.com/channel/UCUooZAqgfE4ngJ0oXsj3-MA/
Python Program List (I Have Solved)
https://codewithtj.blogspot.com/p/python-program-series.html
0 Comments