1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Serggg [28]
3 years ago
9

(Reverse number) Write a program that prompts the user to enter a four-digit inte- ger and displays the number in reverse order.

Here is a sample run:
Computers and Technology
1 answer:
prohojiy [21]3 years ago
6 0

Answer:

The program in Python is as follows:

num = int(input("4 digit number: "))

numstr = str(num)

if(len(numstr)!=4):

    print("Number must be 4 digits")

else:

    numstr = numstr[::-1]

    num = int(numstr)

    print(num)

Explanation:

This prompts user for input

num = int(input("4 digit number: "))

This converts the input number to string

numstr = str(num)

This checks if number of digits is or not 4

if(len(numstr)!=4):

If not, the following message is printed

    print("Number must be 4 digits")

else:

If digits is 4,

This reverses the string

    numstr = numstr[::-1]

This converts the reversed string to integer

    num = int(numstr)

This prints the reversed number

    print(num)

You might be interested in
We can improve our knowledge and skills on animals and fish raising with the use of internet​
bagirrra123 [75]

Answer:

yeah that would be great

5 0
2 years ago
Who was eqvtime tayaishvili?​
maks197457 [2]

Answer:

Image result for who was eqvtime takaishvili?​

Ekvtime Takaishvili (also spelled Taqaishvili) (Georgian: ექვთიმე თაყაიშვილი) (January 3, 1863 – February 21, 1953) was a Georgian historian, archaeologist and public benefactor was born January 3, 1863 in Likhauri  and died February 21, 1953

3 0
3 years ago
Read 2 more answers
Look at the following Python code:
aliya0001 [1]

Ump will be assigned to word2

word1[0:3] gets all of the letters from index 0 to index 3 exclusive (that means index 3 is not included)

4 0
2 years ago
based on the transcript, what did broadcasting the story through the medium of radio allow welles to do?
tamaranim1 [39]

Answer:

It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theatre performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey.

Explanation:

It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theater performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey. Just previously it was Halloween night, and hence, this was expected. And various listeners of the show were shocked, and they made a lot of crazy calls to the nearby Police Stations, as well as the newspaper publication houses. The radio stations tried to convince various journalists that the radio episode was able to cause hysteria throughout the USA. And by the very next dawn, the front column of each new newspaper from coast to coast together with the headlines related to the huge panic inspired allegedly by the CBS broadcast.

8 0
2 years ago
~ I already know this ~ who was the bits victim in five nights at freddys 4 <br> ___10 points___
Andreas93 [3]

Answer:

i dont know anything about them only that the bear is the ducks son and the duck is the fox mom.

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • Which area of the network would a college it staff most likely have to redesign as a direct result of many students bringing the
    10·1 answer
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • What is the purpose of inserting SmartArt in a Microsoft Office program? (1 point)
    11·2 answers
  • Forms are used to a provide a more user-friendly way to work with data in tables
    14·1 answer
  • Each time the user selects an item from a list box in a web page, a postback occurs, the web page will redisplay, and the page_l
    12·1 answer
  • For some reason, Danica's classmate George could not find the registered symbol in the symbol gallery. He is selling
    14·1 answer
  • In paragraph form, explain and describe at least three common situations in which you would yield the right-of-way.
    5·1 answer
  • Detecta 1 problema
    5·2 answers
  • Which of the following behaviors does not harm a company if your employment is terminated?
    9·1 answer
  • Three reasons Why we connect speakers to computers
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!