Question: Write Python code to take the name of a user's favourite restaurant and store it in a variable called string _ fav. Below this, write

Write Python code to take the name of a user's favourite restaurant and store it in a variable called string_fav. Below this, write a statement to take in the user's favourite number. Use casting to store it in an integer variable called int_fav. Print out both of these using two separate print statements below what you have written. Be careful! Once this is working, try to cast string_fav to an integer. What happens? Add a comment in your code to explain why this is.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!