Python Forum
urgent I got a syntax errors
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
urgent I got a syntax errors
#2
Use Code Tags.
There are many errors in this short code.
Look like you have a starting whitespace in line 1 as you get IndentationError.
import math

a = int(input("Please enter the number of your new : "))
b = int(input("Please enter the number of your oldies: "))
videos = a * 3
oldies = b * 2
print(f'The total cost is ${videos + oldies}')
Output:
Please enter the number of your new : 3 Please enter the number of your oldies: 2 The total cost is $13
I guess this task you have gotten to solve,but you have not looked into Python to learn the most basic stuff🧐
Reply


Messages In This Thread
urgent I got a syntax errors - by alm - Feb-28-2021, 12:49 PM
RE: urgent I got a syntax errors - by snippsat - Feb-28-2021, 01:37 PM
RE: urgent I got a syntax errors - by alm - Feb-28-2021, 02:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Python Homework (Urgent help needed!!) chickenseizuresalad 6 4,401 Oct-11-2021, 01:59 AM
Last Post: Underscore
Exclamation urgent , Python homework alm 2 2,362 May-09-2021, 11:19 AM
Last Post: Yoriz
Heart Urgent homework help needed Medou 4 2,794 Nov-24-2020, 09:28 AM
Last Post: buran
  [Urgent] build code GodMaster 2 1,846 Mar-23-2020, 12:25 AM
Last Post: jefsummers
  Bifid Genkey (Urgent) Laura123 2 2,097 Mar-09-2020, 08:09 PM
Last Post: micseydel
  Python Homework Help *Urgent GS31 2 2,632 Nov-24-2019, 01:41 PM
Last Post: ichabod801
  Need help! Please! Urgent! foxylen 1 2,331 Feb-27-2019, 05:50 PM
Last Post: buran
  (Not urgent) IDLE issue with methods vinfer12 5 4,053 Mar-22-2018, 09:00 PM
Last Post: Gribouillis
  Machine Learning Antivirus [Urgent] Echoo0o 4 4,958 Jul-28-2017, 01:57 PM
Last Post: nilamo
  whats wrong with my code? syntax errors r6lay 5 6,565 Mar-16-2017, 04:14 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020